Friday, March 04, 2011

ASP.NET : HTTP Error 407 Proxy authentication error

If you have to develop behind a proxy, (I hate the @#$% things) you are pretty much guaranteed to get this error.

The solution is to add the following to the web.config.

<configuration>
  <system.net>
    <defaultproxy enabled="true" usedefaultcredentials="true">
      <proxy bypassonlocal="True" usesystemdefault="True">
    </proxy></defaultproxy>
  </system.net>
</configuration>

This specifies that there is a proxy, it uses your default Windows credentials to authenticate, bypasses the proxy for local addresses and uses the standard IE proxy defaults.

Problem solved.

Enjoy!

1 comment:

Anonymous said...

Thank you!

After migrating a SharePoint form from SP 2007 to SP 2010, everything was working fine except the form data submission, with such "407 proxy error" message.

Using your hint has solved the problem, it was indeed an IIS issue.