如何让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>

 

 

posted on 2009-09-21 14:02  zqonline  阅读(2767)  评论(0编辑  收藏  举报

导航