PC Review


Reply
 
 
Mike
Guest
Posts: n/a
 
      4th Oct 2007

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




 
Reply With Quote
 
 
 
 
jdlwright@gmail.com
Guest
Posts: n/a
 
      5th Oct 2007
Hi Mike, try setting KeepAlive=true in the request.

Jim

 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      5th Oct 2007

Hi Jim,

I did that, but it did not help.



<(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> Hi Mike, try setting KeepAlive=true in the request.
>
> Jim
>



 
Reply With Quote
 
jdlwright@gmail.com
Guest
Posts: n/a
 
      5th Oct 2007
On Oct 4, 5:15 pm, "Mike" <m...@mike.com> wrote:
> Hi Jim,
>
> I did that, but it did not help.


Shame because that was the exact issue we had before.

 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      5th Oct 2007
you are using the default credentials, which are either:

the asp.net service account which does not have domain permissions, and
can not connect to the server.

you have impersonate on and are using nt security. in this case your
server does not have a primary token (1 hop rule). you will need to
switch to kerberos or basic authentication.

-- bruce (sqlwork.com)

Mike wrote:
> 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
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server Error: 451, Socket Error: 10053, Error Number: 0x800CCC0F =?Utf-8?B?RGFuaWVsYQ==?= Windows XP Help 3 17th Aug 2007 05:10 PM
Access error 3197 and JETCOMP.exe error "Error compacting database =?Utf-8?B?Vmlja3k=?= Microsoft Access 2 21st Jul 2007 12:29 AM
Error connecting to SQLExpress 2005 locally (error: 26 - Error Locating Server/Instance Specified) hfk0 Microsoft ASP .NET 2 27th Mar 2006 09:43 PM
3 Problems - Media Center Error, Date/Time Error, Downloading Updates Error angieangie Windows XP General 0 23rd Dec 2005 06:33 PM
A runtime error has occured. Do you want to debug? Line: 1 Error: syntax error Eric Windows XP Networking 0 24th Nov 2003 03:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:23 PM.