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

前端 未结 7 2177
轻奢々
轻奢々 2020-12-04 16:34

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

7条回答
  •  独厮守ぢ
    2020-12-04 17:14

    Check with your firewall expert. They open the firewall for PROD servers so there is no need to use the Proxy.

    Thanks your tip helped me solve my problem:

    Had to to set the Credentials in two locations to get past the 407 error:

    HttpWebRequest webRequest = WebRequest.Create(uirTradeStream) as HttpWebRequest;
    webRequest.Proxy = WebRequest.DefaultWebProxy;
    webRequest.Credentials = new NetworkCredential("user", "password", "domain");
    webRequest.Proxy.Credentials = new NetworkCredential("user", "password", "domain");
    

    and voila!

提交回复
热议问题