WebClient generates (401) Unauthorized error

后端 未结 5 1906
予麋鹿
予麋鹿 2020-12-06 09:14

I have the following code running in a windows service:

WebClient webClient = new WebClient();
webClient.Credentials = new NetworkCredential(\"me\", \"12345\         


        
5条回答
  •  不知归路
    2020-12-06 09:33

    Apparently the OS you are running on matters, as the default encryption has changed between OSes. This blog has more details: http://ferozedaud.blogspot.com/2009/10/ntlm-auth-fails-with.html

    This has apparently also been discussed on stackoverflow here: 407 Authentication required - no challenge sent

    I would suggest read the blog first as the distilled knowledge is there.

提交回复
热议问题