Reputation:
Hi i am creating some web requests through my controller in my asp.net MVC apps.To authenticate proxy i am using
System.Net.WebRequest.DefaultWebProxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
This works fine while making web request to external servers like e.g: http://www.google.com or whatever
but when i make request to my localhost it says proxy error and gives a error code 502. What could be the possible cause of this error? Any help really appreciated.
Upvotes: 1
Views: 2220
Reputation:
It was the issue with IIS which actually doesn't read the host file so have to manually assign the proxy server and the bypass list to the web.config file. Good resource http://msdn.microsoft.com/en-us/library/31465c77.aspx
Upvotes: 1