osh*_*nen 7 c# web-services asmx .net-3.5
为什么对于我的一些Web服务,我得到测试表单,所以我可以看到生成的xml数据,但对于其他Web服务,我收到一条消息说The test form is only available for requests from the local machine.?
两次,我从客户端浏览器连接到Web服务的URL,所有Web服务都是使用C#,.NET-3.5创建的.
Ada*_*rad 13
我用Google搜索"测试表仅适用于本地机器的请求."
有很多结果,并且一致意见是将这些节点添加到Web服务的web.config中.我还没有尝试过这个解决方案,但您可以检查一下远程显示测试表单的Web服务是否具有web.config中包含这些节点的Web服务.或者,您可以将其添加到提供此消息的Web服务,并查看测试表单是否开始远程显示.
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
</configuration>
Run Code Online (Sandbox Code Playgroud)
以下是一些搜索结果