Mar
09
2010

How to disable proxy server via web.config file

I’m developing a simple ASP.NET page to consume an RSS feed, format and output the content. My default proxy requires authentication, so unless I supply proxy credentials or bypass the proxy altogether, I get a “407 Proxy Authentication Required” error.

Fortunately I can access the RSS feed URL directly without going through the proxy, so the solution is simple – I just need to instruct my application to ignore the default proxy settings by adding the following lines in my web.config file, within the <configuration> element:

  <system.net>
    <defaultProxy>
      <proxy usesystemdefault="False"/>
    </defaultProxy>
  </system.net>
If you enjoyed this post, please share it:
  • Twitter
  • Facebook
  • del.icio.us
  • Reddit
  • Digg
  • StumbleUpon
  • Technorati
  • email
  • RSS

Written by Chris Barnes in: ASP.NET | Tags: , , , ,

No Comments »

RSS feed for comments on this post. TrackBack URL


Leave a Reply

Proudly powered by WordPress and W2-S Internet Services. Design based on Aeros Theme by TheBuckmaker.com.