开发者

What's the difference between WebClient DefaultCredentials and NetworkCredentials?

开发者 https://www.devze.com 2023-04-12 16:02 出处:网络
For some reason my WebClient app that used to work using DefaultCredentials now gives me a 401 Unauthorized. Using NetworkCredentials with the exact same ID and PW works.

For some reason my WebClient app that used to work using DefaultCredentials now gives me a 401 Unauthorized. Using NetworkCredentials with the exact same ID and PW works.

Something must have changed on the web server, but I have no control of that. I just find it strange that ther开发者_JAVA百科e is a difference between DefaultCredentials and NetworkCredentials.

What could possibly be the difference and how to debug?


Did you read the msdn article and this?

They say DefaultCredentials represents the credentials of the local user. But I cannot answer you why it was working in the past. Username and password is the same like in the past?

Or do you mean another property as WebClient.Credentials ?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号