Periodically, I find myself writing an N-Tier, SaaS app written in Winforms or WPF for a Bank or Energy firm, that uses proxies.
In fact, as security becomes a better understood component, providing a standardised environment in the enterprise, the more companies typically use proxy servers.
Every once in a while I come across the dreaded message The remote server returned an error: (407) Proxy Authentication Required.
There is an article here that explains the issue. Make sure you add this to your app.config between the configuration nodes.
<defaultProxy enabled=“true“ useDefaultCredentials=“true“>
<proxy autoDetect=“True“ usesystemdefault=“True“/>
enabled Specifies whether a web proxy is used. The default value is true.
useDefaultCredentials Specifies whether the default credentials for this host are used to access the web proxy. The default value is false.
autoDetect Specifies whether the proxy is automatically detected. The default value is unspecified.
usesystemdefault Specifies whether to use Internet Explorer proxy settings. If set to true, subsequent attributes will override Internet Explorer proxy settings. The default value is unspecified.