Recently I was debugging a simple application that requested a local URL through the WebRequest implementation in .NET but that wasn't connecting propertly for some unknown reason.

I ended up with the conclusion that the Internet Explorer proxy settings prevented the application from connecting properly and sought a way to prevent these proxy settings from being applied to the web request.

The solution for this was to simply set the proxy settings to null and the request would then bypass the proxy settings and then connected properly.

HttpWebRequest request = (HttpWebRequest)WebRequest.Create("");
request.Proxy = null; // Bypass the default (IE) proxy 
HttpWebResponse response = (HttpWebResponse)request.GetResponse();