How can I set an HTTP Proxy (WebProxy) on a WCF client-side Service proxy?

后端 未结 5 749
孤独总比滥情好
孤独总比滥情好 2020-11-29 00:57

How can I set the HTTP proxy programmatically, on a WCF client, without using the default proxy?

Proxies, proxies, proxies.

According to the WCF model of

5条回答
  •  野性不改
    2020-11-29 01:25

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

    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.

提交回复
热议问题