【发布时间】:2011-09-25 21:53:31
【问题描述】:
如何将代理服务器添加到 WCF 中的自定义绑定?
【问题讨论】:
-
我找到了解决方案: HttpsTransportBindingElement httpsTransport = new HttpsTransportBindingElement(); httpsTransport.ProxyAddress = new Uri("proxyaddress"); httpsTransport.MaxReceivedMessageSize = 2147483647; stsBinding.Elements.Add(httpsTransport);其中 stsBinding 是我们的 CustomBinding 类型