且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 WCF 客户端服务代理上设置 HTTP 代理 (WebProxy)?

更新时间:2023-09-14 08:57:28

代理设置是绑定配置的一部分.例如,查看 ProxyAddress 属性BasicHTTPBindingWSHttpBinding 类/配置元素.

The proxy settings are part of the binding configuration. For example, look at the ProxyAddress property of the BasicHTTPBinding and WSHttpBinding classes/configuration elements.

看起来您将端点配置保留在 app.config 文件中,在这种情况下,您应该能够在那里设置地址.

Looks like you're leaving your endpoint configuration in the app.config file, in which case you should be able to set the address there.