在你的web引用类中,添加下面的代码块:
...
Public Sub New()
MyBase.New
'''屏蔽此处
Me.Url =System.Configuration.ConfigurationSettings.AppSettings.Item("WsURL") '''"http://LOCALHOST/MyWs/logon.asmx"
End Sub
...
you probably should have the ip or hostname information in a configuration file, so when you deploy it, you only need to change that configuration file.