The test form is only available for requests from the local machine

跟風遠走 提交于 2020-01-12 17:39:11

问题


Why is it that for some of my web-services, I get test forms so I can see the generated xml data, but for other web-services, I get a message saying The test form is only available for requests from the local machine.?

Both times, I am connecting to the URL of the web-service from a client side browser and all web-services are created with C#, .NET-3.5.


回答1:


I googled for "The test form is only available for requests from the local machine."

There were many results, and the consensus is to add these nodes to the web.config of the web service. I haven't tried this solution yet, but you can check to see if your web services that shows the test form remotely has this that have these nodes in the web.config. Or, you can add it to the web services that give this message and see if the test form starts appearing remotely.

<configuration>
    <system.web>
    <webServices>
        <protocols>
            <add name="HttpGet"/>
            <add name="HttpPost"/>
        </protocols>
    </webServices>
    </system.web>
</configuration>

Here are some of the search results

  • StackOverflow: The test form is only available for requests from the local machine.
  • GeeksWithBlogs: "The test form is only available for requests from the local machine"
  • Microsoft support: INFO: HTTP GET and HTTP POST Are Disabled by Default


来源:https://stackoverflow.com/questions/13234819/the-test-form-is-only-available-for-requests-from-the-local-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!