WCF CustomBinding和代理

时间:2009-12-15 11:21:42

标签: wcf proxy

如何将代理服务器添加到WCF中的自定义绑定?

1 个答案:

答案 0 :(得分:2)

我找到了解决方案:

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

其中stsBinding是我们的CustomBinding类型