Hi,
In reading the docs for how to do NTLM authentication w/ .Net, an
interesting problem seems to appear. Specifically, how do you set the
username/password info for a 3rd party Web server that uses Basic
authenticaiton AND, at the same time, go thru NT authentication. The
pseudo-code is below:
'Does a basic Get request via NTLM
Try
wr = CType(WebRequest.Create(URL), HttpWebRequest)
wr.Credentials = New NetworkCredential (NetworkUserName,
NetworkPassword, NetworkDomain)
Resp = CType(wr.GetResponse(), HttpWebResponse)
Catch ex as WebException
' Not shown .. code to detect when we need to a simple WWW-Authenticate
if WWWAuthenticateRequested then
'Do the same thing but, this time, add the UserName/Password
required by the external Web site (plain text authentication)
wr = CType(WebRequest.Create(URL), HttpWebRequest)
wr.Credentials = New NetworkCredential(ExternalSiteUserName,
ExternalSitePassword)
Resp = CType(wr.GetResponse(), HttpWebResponse)
end if
End Try
We can't test this at our site but it would appear that setting the
credentials correctly for the external Web site would invalidate the
credentials we need to authenticate on the internal NTLM system. What's the
correct way to get around this?
Thanks, Steve
Then, wh