// 记得 using System.Net;
System.Net.WebProxy myProxy = new System.Net.WebProxy("localhost:9099", true); myProxy.Credentials = CredentialCache.DefaultCredentials; wsTest.Service client = new wsTest.Service(); client.Proxy = myProxy; string rtnValue = client.HelloWorld();