如何将代理服务器添加到WCF中的自定义绑定?
答案 0 :(得分:2)
我找到了解决方案:
HttpsTransportBindingElement httpsTransport = new HttpsTransportBindingElement();
httpsTransport.ProxyAddress = new Uri("proxyaddress");
httpsTransport.MaxReceivedMessageSize = 2147483647; stsBinding.Elements.Add
(httpsTransport);
其中stsBinding是我们的CustomBinding类型