I spent two hours on this error "HTTP status 407: proxy authentication required error" when calling a web service, my code is like the following
WebProxy oWebProxy = new System.Net.WebProxy(ProxyServer, ProxyPort);
oWebProxy.Credentials = new NetworkCredential(ProxyUser,ProxyPassword,ProxyDomain);
oserv.Proxy = oWebProxy;
oserv.Credentials = new NetworkCredential(theusername, thepassword);
I confirmed that the proxy address and user-user password are correct, and I could access the web service through IE on the same computer, but when I run the code from VS, the error continues to pop up. I also tried UserDefaultCredentials=true, but no luck.
Any idea?
source
share