2

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 will 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?

Tudor Olariu
  • 1,318
  • 1
  • 11
  • 18

1 Answers1

0

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

Sam Plus Plus
  • 4,381
  • 2
  • 21
  • 43
  • 2
    No, because I need to intercept the second step in the NTLM authentication to add my custom header, but the entire authentication is made transparent by .NET; GetResponse() will only serve the *final* response. – Tudor Olariu Mar 18 '11 at 14:02