Re: FormsAuthentication and GetRedirectUrl
- From: "Joe" <jbassking@xxxxxxxxxxxxxxx>
- Date: Thu, 14 Feb 2008 11:23:43 -0500
Hi Steven,
I sort of thought that would be the case so I did manually track the url for
redirection after the user logs in.
Thanks,
Joe
"Steven Cheng[MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:5W4dY5ebIHA.2164@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Joe,
As for the Forms Authentication url redirction problem you mentioned, I
understand what you want to do and the difficulty here is
FormsAuthentication will only append originalUrl in querystring when the
redirection is caused by Unauthorization. For the "create new account"
case, it is not redirected by unauthorization, but by the user who click
the link, then the ASP.NET will not provide such url.
Currently, my suggestion is to manually keep such a url in session. for
example, in the page where you provide the "Create User account" link, you
can add the following code logic:
** you should modify the link to the create account page, append the
original url to the querystring of this link's url
** in the create account page, you can get the original url from
querystring and store it into session
** After user finished creating account, you can check the session
variable, if there is url exists, redirect to the url (if not exists due
to
some reason, redirect the default location)
How do you think?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "Joe" <jbassking@xxxxxxxxxxxxxxx>
Subject: FormsAuthentication and GetRedirectUrl
Date: Tue, 12 Feb 2008 12:40:33 -0500
link
Hello,
I'm using FormsAuthentication for a single page. If the user tries to go
direct to the page they are prompted to login. This all works fine. But if
the user doesn't have a user account and clicks the Create user account
the GetRedirectUrl no longer has the original page they were going to.the
Instead it has the default from the web.config.
Is there any way to preserve the original URL past the login page?
Ideally if the user clicks to create account, I want to transfer them to
page to create it. Once done I want to direct them to their original page
which will prompt them to login.
I hope this makes sense.
Thanks,
Joe
.
- Follow-Ups:
- Re: FormsAuthentication and GetRedirectUrl
- From: Steven Cheng[MSFT]
- Re: FormsAuthentication and GetRedirectUrl
- References:
- FormsAuthentication and GetRedirectUrl
- From: Joe
- RE: FormsAuthentication and GetRedirectUrl
- From: Steven Cheng[MSFT]
- FormsAuthentication and GetRedirectUrl
- Prev by Date: Re: loading xmldocument with httpwebrequest object?
- Next by Date: MultiView and changing views.
- Previous by thread: RE: FormsAuthentication and GetRedirectUrl
- Next by thread: Re: FormsAuthentication and GetRedirectUrl
- Index(es):
Relevant Pages
|