Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The remote server returned an error: (407) Proxy Authentication Required

I'm getting this error when I call a web service:

"The remote server returned an error: (407) Proxy Authentication Required".

I get the general idea and I can get the code to work by adding

myProxy.Credentials = NetworkCredential("user", "password", "domain"); 

or by using DefaultCredentials in code. My problem is that the call to the web service works in production without this.

It seems like there is a non code solution involving Machine.config, but what is it? At the moment I can't get to the production box's machine.config file to see what that looks like. I tried updating my machine.config as follows, but I still get the 407 error.

<system.net>     <defaultProxy enabled="true" useDefaultCredentials="true">         <bypasslist>             <clear />         </bypasslist>         <proxy proxyaddress="myproxy:9000"                usesystemdefault="false"                bypassonlocal="true"                autoDetect="False" />     </defaultProxy> </system.net> 
like image 724
chris Avatar asked Apr 05 '10 22:04

chris


People also ask

How do I fix Error 407 Chrome?

This error is related to proxy authentication. To view or change your proxy settings in Google Ads Editor, select Tools > Settings (Windows) or Google Ads Editor > Preferences (Mac). Was this helpful?

What does error code 407 mean?

The HTTP 407 Proxy Authentication Required client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for a proxy server that is between the browser and the server that can access the requested resource.

What is proxy authentication required?

What Does Proxy Authentication Required Mean? The 407 Proxy Authentication Required error code indicates that the server cannot complete the request because the client lacks appropriate authentication credentials for a proxy server that intercepts the request between the client and server.


1 Answers

Just add this to config

<system.net>     <defaultProxy useDefaultCredentials="true" >     </defaultProxy> </system.net> 
like image 76
Seçkin Durgay Avatar answered Sep 24 '22 14:09

Seçkin Durgay