2009-12-15 73 views
2

如何將代理服務器添加到WCF中的自定義綁定中?WCF CustomBinding和代理

+0

我發現溶液CustomBinding的類型: HttpsTransportBindingElement httpsTransport =新HttpsTransportBindingElement(); httpsTransport.ProxyAddress = new Uri(「proxyaddress」); httpsTransport.MaxReceivedMessageSize = 2147483647; stsBinding.Elements.Add(httpsTransport); 其中stsBinding是我們的CustomBinding類型 – 2009-12-15 12:08:25

回答

1

我發現瞭解決方案:

HttpsTransportBindingElement httpsTransport = new HttpsTransportBindingElement(); 
httpsTransport.ProxyAddress = new Uri("proxyaddress"); 
httpsTransport.MaxReceivedMessageSize = 2147483647; stsBinding.Elements.Add 
(httpsTransport); 

其中stsBinding是我們

+0

好的,那麼我們需要指定哪些憑據?我應該如何輸入我的代理用戶名和代理密碼? – 2013-08-21 08:37:32