I suggest you ...

Fix it so that .NET apps can access HTTP thru authenticating proxy server by default

If you run a .NET app that needs to talk to the web, and you're behind an authenticating proxy server, then that app will fail to talk to the web.

Internet Explorer and Google Chrome work, Visual Studio and loads of other Microsoft apps will work. They can all talk to the web. But every .NET-based app or website I've ever seen will fail.

The implications of this are profound. I've seen umpteen forum posts over the years where people are scratching their heads, wondering what's wrong. I've seen IT guys re-route their users thru special-case connections to the web, because the user has to access some web functionality.

I've installed a piece of software that needs to authenticate a license key over the web... only to fail. And then you have to call their support lines.

I've seen Umbraco and Orchard CMS users fail to access the online galleries of themes and widgets. No-one - developers, users, IT guys - have a clue what's wrong or how to fix it.

Even Microsoft's .NET apps fail: if I try to run WCF's svcutil.exe on a remote service, it will fail... because I'm behind an authenticating proxy server.

And yet the fix is so simple. Simple, but no-one knows about it... no-one! Take a look at this StackOverflow question:-


The simple, simple fix is to add this to your .NET app's app/web config file:-
<defaultProxy useDefaultCredentials="true" />

But since no-one knows about this, let's end the years of confusion and have .NET 4.5 change the default value of useDefaultCredentials from false to true. Problem solved, and everyone can get on with their lives.

If Internet Explorer "just works", why can't .NET-build apps "just work"?

And for a better-argued case, see here:-

Thank you.

780 votes
Sign in
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Andrew Webb shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Sign in with: facebook google
Signed in as (Sign out)
  • Anonymous commented  ·   ·  Flag as inappropriate

    This still doesn't fix my code. I'm using HttpWebRequest to download xml from rss feed. it works in all browsers on localhost, it works on postman, but after deployment to server, it simply cannot connect to remote server. i'm almost frustruated.

  • Anonymous commented  ·   ·  Flag as inappropriate

    2848203063 says:
    2018年7月21日 at 15:57







    支持使用者建立属于你自己的WebProxy系统,支持管理,计费,多服务器切换等 ,基于ISA2006有强大的后端管理功能

  • Jesse commented  ·   ·  Flag as inappropriate

    You are a life saver. I was going nuts !!!

    If I have another child, I will name him Andrew :)

  • Gaetano commented  ·   ·  Flag as inappropriate

    Hey Andres,

    3 days spent on this and about 2000 posts read before to input the right sequence of words in Google and get your page . THANK YOU!!!!!!


  • daschdasch commented  ·   ·  Flag as inappropriate

    omfg why is this the only page i can read this.
    what´s wrong with this world. 4 days search to find this link :)))

  • James Hood commented  ·   ·  Flag as inappropriate

    It would also be nice if defaultProxy would use a manually configured proxy since it currently appears to just work for wpad/pac auto-configured proxies. To echo others in the comments, if the user enters a username/password in IE/Edge for a proxy, it would be nice if that would also work in other places like .NET.

  • Divakar commented  ·   ·  Flag as inappropriate

    In my case changing the configuration file did not work. However adding ip(in my case) to the exception in IE => Tools => Internet Options => Connections => LAN Settings => Advanced => Exceptions . Sharing because it might help some one.

    Thanks for sharing this Andrew.

  • Mo commented  ·   ·  Flag as inappropriate


    Your a top man, you were right, nobody knows about this, your article has been a life saver, our web service calls our now working behind an authenticated proxy. Thank you for sharing...

  • Andrew Webb commented  ·   ·  Flag as inappropriate

    It's been over three years since I created this suggestion, and still no response at all from Microsoft. Very sad. And obviously we've missed the .NET 4.5 boat.

    However, I'm pleased to see how this suggestion, and my related answer on StackOverflow, has obviously helped a lot of people with this serious, but easily preventable, problem.

  • Dmitry commented  ·   ·  Flag as inappropriate

    Words can't say enough how amazingly brilliant your solution is. No other article on the web does not address the problem so well and precisely! Simply brilliant!

  • Anonymous commented  ·   ·  Flag as inappropriate

    Hi, will this work if its a SQUID proxy with an required authentication set up.

    We have one such proxy and the current settings don't seem to take effect.

  • Anon commented  ·   ·  Flag as inappropriate

    Andrew, you are fantastic. I am definitely one of the people who spent hours scratching their head wondering why the .NET app I support was not able to connect through an authenticating proxy. This was the answer, and it would have saved many troubleshooting hours and much stress if this "just worked" as it does in IE.

  • Larry commented  ·   ·  Flag as inappropriate

    Thanks very much! Came across this after several hours of searching. My 407 error (Proxy Authentication Required) is gone.

  • Giles commented  ·   ·  Flag as inappropriate

    Brilliant Answer. Solved my problem, so easily. gotta love a simple fix. well done.

← Previous 1

Feedback and Knowledge Base