测试webservice的时候,如果出现这个错误:"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>

 

也就是说,在默认情况下,是禁止远程调用的.  出于安全问题,这个远程调用被禁止了(不过还是可以在本地调用)。所以出现这个错误

posted @ 2014-05-09 18:05  梨花驿路  阅读(737)  评论(0编辑  收藏  举报