【问题标题】:WCF CustomBinding and ProxyWCF 自定义绑定和代理
【发布时间】: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 类型

标签: wcf proxy


【解决方案1】:

我找到了解决办法:

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

其中 stsBinding 是我们的 CustomBinding 类型

【讨论】:

  • 好的,那么我们需要指定的凭据呢?我应该如何输入我的代理用户名和代理密码?
猜你喜欢
  • 2010-11-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-06-05
  • 2019-11-21
  • 2014-06-16
  • 2011-04-06
相关资源
最近更新 更多