有客户反应在本地调试程序是好的,为什么传到服务器不能用get/post调用他。其实VS默认生成的web.config并没有声明这样可以远程调用。
解决办法:
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
<add name="HttpSoap"/>
<add name="Documentation"/>
</protocols>
</webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
<add name="HttpSoap"/>
<add name="Documentation"/>
</protocols>
</webServices>