WebService 访问代理及安全性验证设置
2008-11-06 08:52 Vincent.C 阅读(285) 评论(0) 编辑 收藏 举报- ERPWS.ErpInterface ws = new ERPWS_Demo.ERPWS.ErpInterface();
- //Local Network Proxy Settings
- ws.Proxy = new System.Net.WebProxy("172.31.170.21:8089", true);
- ws.Proxy.Credentials = new System.Net.NetworkCredential("username", "password", "doamin");
- //Server Credential Settings
- CredentialCache cache = new CredentialCache();
- cache.Add(new Uri(ws.Url), "Negotiate", new NetworkCredential("username", "password", "doamin"));
- ws.Credentials = cache;