Re: RedirectFromLogin?
- From: Dominick Baier [DevelopMentor] <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 3 Mar 2006 17:41:46 +0000 (UTC)
Hi ,
when a user hits a page that needs auth - formsauthentication will redirect to the specified in loginUrl in the <forms> config - this page will get the originally requested Url as the returnUrl parameter -
formsauth.RedirectFromLogin pages picks this parameter up for redirection back.
As i said you don't have to do that - you do a manual redirect to whereever you want to - just set the auth cookie without automatic redirections and call Response.Redirect afterwards.
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
Can you clarify?
I have a user that hits a page, but they haven't logged in yet. I
redirect
them to a NotAuthorized page, which lets them know they weren't
authorized
and then redirects them to the login page.
So before redirecting to the login page, you're saying that I need to
do
some call that will plug the query parameter "returnURL" to where I
want them
to go when the ReturnFromLogin is called?
"Dominick Baier [DevelopMentor]" wrote:
it redirects to the returnUrl query parameter.
You can do that yourself with a combination of
FormsAuth.SetAuthCookie and Response.Redirect
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
When in login code, how does the RedirectFromLogin know where to
redirect? What cookie or session variable (or whatever) does it use
to know where to go, and is this a writeable thing that I can make
RedirectFromLogin to go where I want it to go.
.
- Prev by Date: Re: RedirectFromLogin?
- Next by Date: Re: Windows Authentication in asp.net 2005 to SQL Server?
- Previous by thread: Re: RedirectFromLogin?
- Index(es):
Relevant Pages
|