動態(tài)加載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里面,用的時候去取。 簡單罷? |
|
|