开发者

Custom NTLM authentication with HttpWebRequest

开发者 https://www.devze.com 2023-01-28 00:15 出处:网络
I need to authenticate to a server which exposes a custom NTLM-based authentication scheme, using the standard HttpWebRequest object.

I need to authenticate to a server which exposes a custom NTLM-based authentication scheme, using the standard HttpWebRequest object. It's pretty much basic NTLM except that during the NTLM handshake protocol I receive a cookie from the server which I must send back during the handshake, otherwise the authentication wi开发者_StackOverflowll fail.

My question is: how do I hook into the HttpWebRequest's handshake protocol so that I can add the cookies in the header, during the handshake?


You could do it in the Get Response method http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.getresponse.aspx

0

精彩评论

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