动态加载Web Service比如你已经用教科书式的方法添加了一个Web Referece,然后现在这个Web Service内容没有变,只是换了各地方。比如从localhost:8080/a.asmx换到了localhost:8090/a.asmx。如此一来你不必重新修改Web Reference只需要在使用WebMethod时WebS.A a = new WebS.A(); a.Url="http://localhost:8090/a.asmx" a.remoteDosth(); 就可以了! 可以把Url字符串存到config里面,用的时候去取。 简单罢? |
|