Due to some reasons (mentioned in this post), To handle the proxy in our web application, I have assigned the user-defined proxy values to WebRequest.DefaultWebProxy
.
Code:
var proxy = new WebProxy(data.ProxyUri);
proxy.Credentials = new NetworkCredential(data.ProxyUsername, data.ProxyPassword);
WebRequest.DefaultWebProxy = proxy;
Since WebRequest.DefaultWebProxy is a Global HTTP Proxy, the assigned proxy values are reflected in other functionalities in our application. In regard to this, I am having a doubt whether the WebRequest.DefaultWebProxy
property is common to a particular single application or all applications running in the same browser(or hosted in IIS)? Because I don't want to use this approach if affects/changes the default proxy of other applications.