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

前端 未结 7 2200
轻奢々
轻奢々 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:04

    In following code, we don't need to hard code the credentials.

    service.Proxy = WebRequest.DefaultWebProxy;
    service.Credentials = System.Net.CredentialCache.DefaultCredentials; ;
    service.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
    

提交回复
热议问题