Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Forms authentication login page

Reply
Thread Tools

Re: Forms authentication login page

 
 
John Saunders
Guest
Posts: n/a
 
      08-27-2003
"Jerry III" <> wrote in message
news:%...
> Is there a way to change ASP.NET forms authentication from redirecting to
> the login page and just use Server.Transfer to it instead?


No. That wouldn't work. It has to redirect because that's when it sends the
login cookie.
--
John Saunders
Internet Engineer



 
Reply With Quote
 
 
 
 
Jerry III
Guest
Posts: n/a
 
      08-27-2003
It sends the login cookie BEFORE you enter your user name and password?
What's in it?

Jerry

"John Saunders" <> wrote in message
news:%...
> "Jerry III" <> wrote in message
> news:%...
> > Is there a way to change ASP.NET forms authentication from redirecting

to
> > the login page and just use Server.Transfer to it instead?

>
> No. That wouldn't work. It has to redirect because that's when it sends

the
> login cookie.
> --
> John Saunders
> Internet Engineer
>
>
>



 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      08-28-2003
"Jerry III" <> wrote in message
news:...
> It sends the login cookie BEFORE you enter your user name and password?
> What's in it?
>


No. After you enter your username and password and click "Ok", you validate
the username and password and if valid, call RedirectToLoginPage(...). That
puts the login cookie into Response.Cookies and then redirects to the
originally-requested page. The redirect sets the login cookie, and when the
client requests the original page (due to the redirect), it will send the
login cookie.
--
John Saunders
Internet Engineer



 
Reply With Quote
 
Jerry III
Guest
Posts: n/a
 
      08-29-2003
I know that. That's why I would like the original request (the one where
you're not authenticated yet, NOT the request submitting your name/password)
not to be redirected to the login page but rather have the server to do
Server.Transfer to that page. There's absolutely no need for the redirect.

Jerry

"John Saunders" <> wrote in message
news:OgEP$...
> "Jerry III" <> wrote in message
> news:...
> > It sends the login cookie BEFORE you enter your user name and password?
> > What's in it?
> >

>
> No. After you enter your username and password and click "Ok", you

validate
> the username and password and if valid, call RedirectToLoginPage(...).

That
> puts the login cookie into Response.Cookies and then redirects to the
> originally-requested page. The redirect sets the login cookie, and when

the
> client requests the original page (due to the redirect), it will send the
> login cookie.
> --
> John Saunders
> Internet Engineer
>
>
>



 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      08-29-2003
"Jerry III" <> wrote in message
news:...
> I know that. That's why I would like the original request (the one where
> you're not authenticated yet, NOT the request submitting your

name/password)
> not to be redirected to the login page but rather have the server to do
> Server.Transfer to that page. There's absolutely no need for the redirect.


Jerry, the original request doesn't have a page to Server.Transfer _from_!
When the Url Authorization module detects that the user doesn't have access
to the page, it returns a 403 error. The Forms Authentication module sees
this and redirects to the login page.

Note that no handler was executed on this first request, so there's no place
to Server.Transfer _from_.
--
John Saunders
Internet Engineer



 
Reply With Quote
 
Jerry III
Guest
Posts: n/a
 
      08-29-2003
Ok, I agree there's nothing to transfer from but still: the first request
comes to the ASP.NET ISAPI filter (the request processor in java speak). It
checks if the user is authorized (in forms authentication it checks if the
cookie exists and is valid) and if not it sends a redirect (NOT 403 error,
that's sent for Basic and Digest authentication, not for forms). I would
like it to process the login page at this point instead of sending the
redirect, the request processor knows what page that is and there really
isn't a reason not to process it directly instead of redirecting to it.

Jerry

"John Saunders" <> wrote in message
news:...
> "Jerry III" <> wrote in message
> news:...
> > I know that. That's why I would like the original request (the one where
> > you're not authenticated yet, NOT the request submitting your

> name/password)
> > not to be redirected to the login page but rather have the server to do
> > Server.Transfer to that page. There's absolutely no need for the

redirect.
>
> Jerry, the original request doesn't have a page to Server.Transfer _from_!
> When the Url Authorization module detects that the user doesn't have

access
> to the page, it returns a 403 error. The Forms Authentication module sees
> this and redirects to the login page.
>
> Note that no handler was executed on this first request, so there's no

place
> to Server.Transfer _from_.
> --
> John Saunders
> Internet Engineer
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
Forms authentication - Multiple login forms based on directory acc Keltex ASP .Net Security 1 01-24-2006 03:06 PM
Strange problem with Forms authentication: After successfull login, login page is still displayed Pascal Blanchard ASP .Net Security 1 08-18-2004 08:36 AM
Strange problem with Forms authentication: After successfull login, login page is still displayed Pascal Blanchard ASP .Net Security 0 08-17-2004 06:26 PM
Forms Authentication question: How to have some pages open and some requiring forms authentication Eric ASP .Net 2 02-13-2004 02:14 PM



Advertisments