Webservice error, "The test form is only available for requests from the local machine"

简介:

测试webservice的时候,如果出现这个错误:"The test form is only available for requests from the local machine"

在web.config中加入以下配置,就可以解决问题。

复制代码
< system.web >
    
< webServices >
        
< protocols >
          
< add name = " HttpGet " />
          
< add name = " HttpPost " />
        
</ protocols >
    
</ webServices >
</ system.web >
复制代码
原因:
在.NET Framework v1.0中,可以通过远程访问和测试一个web service,但在v1.1下,出于安全问题,这个远程调用被禁止了(不过还是可以在本地调用)。所以出现这个错误
The test form is only available for requests from the local machine


   本文转自loose_went博客园博客,原文链接: http://www.cnblogs.com/michaelxu/archive/2009/06/22/1508114.html ,如需转载请自行联系原作者
相关文章
|
5月前
|
Python
【Error】DeprecationWarning: executable_path has been deprecated, please pass in a Service object
【Error】DeprecationWarning: executable_path has been deprecated, please pass in a Service object
77 2
|
Java
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
1086 0
Appium问题解决方案(8)- selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate.
|
5月前
|
小程序
Failed to load local image resource Xx the server responded with a status of of 500 (HTTP/1.1 500)
Failed to load local image resource Xx the server responded with a status of of 500 (HTTP/1.1 500)
140 4
|
6月前
|
Java 应用服务中间件
Tomcat 报错:The origin server did not find a current representation for the target resource
Tomcat 报错:The origin server did not find a current representation for the target resource
70 1
|
11月前
DevTools failed to load source map: Could not load content for…System error: net::ERR_FILE_NOT_FOUN
DevTools failed to load source map: Could not load content for…System error: net::ERR_FILE_NOT_FOUN
|
Kubernetes 容器
k8s报错:Error from server (NotFound): the server could not find the requested resource (get services h
k8s报错:Error from server (NotFound): the server could not find the requested resource (get services h
成功解决404 Not Found Not Found The requested URL was not found on the server. If yo
成功解决404 Not Found Not Found The requested URL was not found on the server. If yo
|
Web App开发 .NET
解决.Net 4.0 A potentially dangerous Request.Form value was detected from the client 异常
解决ASP.NET 4.0   "A potentially dangerous Request.Form value was detected from the client". 错误在.net中,Request时出现有HTML或Javascript等字符串时,系统会认为是危险性值。
1147 0