M
Mike
Hi,
We wrote a reverse proxy and use Windows Authentication in our websites. The
first time the user connects, an exception occurs (401 Unauthorized). The
code we use is the following:
Dim uri As Uri = New Uri(_remoteServer + OPEN_BRACKET +
context.Session.SessionID + CLOSE_BRACKET + url)
_request = CType(WebRequest.Create(uri), HttpWebRequest)
_request.PreAuthenticate = True
_request.Credentials = CredentialCache.DefaultCredentials
Dim response As HttpWebResponse =
DirectCast(_request.GetResponse(), HttpWebResponse) ' HERE THE
EXCEPTION OCCURS
Is there anything that we forgot to set? If not how can we handle the
exception and resend a request?
Thanks a lot.
Mike
We wrote a reverse proxy and use Windows Authentication in our websites. The
first time the user connects, an exception occurs (401 Unauthorized). The
code we use is the following:
Dim uri As Uri = New Uri(_remoteServer + OPEN_BRACKET +
context.Session.SessionID + CLOSE_BRACKET + url)
_request = CType(WebRequest.Create(uri), HttpWebRequest)
_request.PreAuthenticate = True
_request.Credentials = CredentialCache.DefaultCredentials
Dim response As HttpWebResponse =
DirectCast(_request.GetResponse(), HttpWebResponse) ' HERE THE
EXCEPTION OCCURS
Is there anything that we forgot to set? If not how can we handle the
exception and resend a request?
Thanks a lot.
Mike