如何让WebService服务可修改IP地址
1.WebService 类增加属性 <System.Web.Services.Protocols.SoapDocumentService(routingstyle:=SoapServiceRoutingStyle.RequestElement)>
2.Web引用后 把 URL行业设为动态
3.配置文件:
<applicationSettings>
<ConsoleApplication1.My.MySettings>
<setting name="ConsoleApplication1_localhost_Service" serializeAs="String">
<value>http://192.168.130.2:1080/Service.asmx</value>
</setting>
</ConsoleApplication1.My.MySettings>
</applicationSettings>
</configuration>