测试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