To test the operation using the HTTP POST protocol, click the 'Invoke' button.
来源:互联网 发布:杭州城市骑行大数据 编辑:程序博客网 时间:2024/06/06 02:37
测试webservice的时候,如果出现这个错误:"The test form is only available for requests from the local machine"
在web.config中加入以下配置,就可以解决问题。
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
写了一个Web Service,在内网中查看webservice的内容时一切正常,可是用外网查看WebService的时候显示如下:The test form is only available for requests from the local machine.
当您尝试从远程计算机访问 Web 服务时,不会显示“调用”按钮。并且,您会收到以下错误信息:The test form is only available for requests from the local machine
INFO:默认情况下禁用 HTTP GET 和 HTTP POST
解决方法:通过编辑 Web 服务所在的 vroot 的 Web.config 文件,可以启用 HTTP GET 和 HTTP POST。以下配置同时启用了 HTTP GET 和 HTTP POST:
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
</configuration>
或者,可以通过编辑 Machine.config 中的 <protocols> 节为计算机上的所有 Web 服务启用这些协议。下面的示例启用了 HTTP GET、HTTP POST 及 SOAP,此外还从本地主机启用了 HTTP POST:
<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="HttpPostLocalhost"/>
<!-- Documentation enables the documentation/test pages -->
<add name="Documentation"/>
</protocols>
- To test the operation using the HTTP POST protocol, click the 'Invoke' button.
- Using Python to show the test data
- How to - Invoke the browser
- Prevent the user click a button twice
- The Hypertext Transfer Protocol(HTTP)
- The Hypertext Transfer Protocol(HTTP)
- What is the HTTP protocol?
- How to download streaming audio or video media from the internet using the MMS protocol?
- Using the SOAP Protocol with Java
- Using the uart to load the uboot
- Understanding the HTTP Protocol(了解HTTP协议)
- The Basics to Using DirectShow
- Handles the HTTP POST method
- Replay the test case using KLEE
- The operation on charactor string to compress the same alphabets
- Using the Apache HTTP Server as a forward proxy to the Internet
- xml无法显示(Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again la
- Troubleshooting code that uses the HTTP protocol
- iPhone界面跳转
- UBoot支持双启动(Nor and Nand)及环境变量保存的实现
- apache启动不了?
- Windows下PHP简易环境搭建(WampServer安装使用)
- my webkit FAQ
- To test the operation using the HTTP POST protocol, click the 'Invoke' button.
- shell常见通配符
- seq用法详解
- JAVA人生规划
- CodeIgniter 里集成 FCKeditor 的方法
- 【Linux菜鸟成长记(六)】ubuntu下设置root账户密码
- wxwidgets之入门示例
- ARRAYLIST VECTOR LINKEDLIST 区别与用法
- ISTQB AL高级认证系列01:ISTQB AL-TM测试经理学习目标