NTLM authentication using Windows.Web.Http.HttpClient

泄露秘密 提交于 2019-12-04 13:01:59

Short answer: NTLM auth does work with username / password. Need to retry the connection a second time, because HttpClient is pre-sending BASIC auth when server wants NTLM

Long answer: My app contacts two services hosted on the same server. The first allows Basic auth but the second only allows NTLM. First I connected to the Basic auth service and then I connect to the NTLM one. I would assume the HttpClient would have automatically performed a retry with NTLM when it got the WWW-Authenticate: NTLM header, but it appears that it doesn't. However, if I manually retry the connection, then the second time the HttpClient will perform NTLM auth.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!