473,508 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

get redirect url before login

My users who try to access a page before login are
redirected to my login page. Then after they successfully
login, my login page will redirect the user to the page
they intended to go through this line:

FormsAuthentication.RedirectFromLoginPage(strUserN ame,
False)

What I want now is that I want to capture the origional
url that the use intented to go BEFORE the user logs in. I
don't mind to do this in the login page, but this has to
be done in the page load, before the user's login info
typed in.

I know there is a function:

FormsAuthentication.GetRedirectUrl(strUserName, False)

but this won't work for me because it expect user name.

Any ideas?

Thanks a million!

Nov 18 '05 #1
2 1966
Request.QueryString["ReturnUrl"]

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"feng" <an*******@discussions.microsoft.com> wrote in message
news:a5****************************@phx.gbl...
My users who try to access a page before login are
redirected to my login page. Then after they successfully
login, my login page will redirect the user to the page
they intended to go through this line:

FormsAuthentication.RedirectFromLoginPage(strUserN ame,
False)

What I want now is that I want to capture the origional
url that the use intented to go BEFORE the user logs in. I
don't mind to do this in the login page, but this has to
be done in the page load, before the user's login info
typed in.

I know there is a function:

FormsAuthentication.GetRedirectUrl(strUserName, False)

but this won't work for me because it expect user name.

Any ideas?

Thanks a million!

Nov 18 '05 #2
I suggest using HTTP Module for authentication and authorization. If
you implement HTTP module by including a special line in webconfig,
all requests will go through one central place where you will be doing
the authentication and authorization. All of the pages in your app
will not have to worry about authorization or athentication, because
you can handle it all the way you want in one function. You can
inspect every incoming request and redirect people to login page and
save their original requested page and do it in any way you like,
using either cookies or session or a combination of two.

On Wed, 4 Feb 2004 15:59:38 -0600, "Curt_C [MVP]"
<software_AT_darkfalz.com> wrote:
Request.QueryString["ReturnUrl"]

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"feng" <an*******@discussions.microsoft.com> wrote in message
news:a5****************************@phx.gbl...
My users who try to access a page before login are
redirected to my login page. Then after they successfully
login, my login page will redirect the user to the page
they intended to go through this line:

FormsAuthentication.RedirectFromLoginPage(strUserN ame,
False)

What I want now is that I want to capture the origional
url that the use intented to go BEFORE the user logs in. I
don't mind to do this in the login page, but this has to
be done in the page load, before the user's login info
typed in.

I know there is a function:

FormsAuthentication.GetRedirectUrl(strUserName, False)

but this won't work for me because it expect user name.

Any ideas?

Thanks a million!



Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2957
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a...
2
4447
by: FN | last post by:
I'm using User.Identity.IsAuthenticated on all my pages (from a base class), and redirecting to a login page if not authenticated. The problem is that some pages are in subfolders and others are...
4
4807
by: Dave | last post by:
Hi, Is there anyway to mimic forms authentication's loginUrl and RedirectFromLoginPage functionality using Windows authentication? We are developing intranet sites using basic authentication...
1
2690
by: Sospeter | last post by:
Hi Ken, I have done that but still experiencing same problem. Tried the following i.e. turning smartnavigation = false and using server.transfer as below but nothing works. Please help. ...
10
12157
by: GreggTB | last post by:
I've got an page (LOGIN.ASPX) that receives the user's login information. During the page load, it checks the credentials against a database and, if validation is successful, creates an instance of...
3
2601
by: William Sullivan | last post by:
Have a frameset HTML page (parent) with child .aspx pages. When each of the child pages loads, it checks to see if the user is authenticated, and if not, redirects to the login page: ...
7
11159
by: savvy | last post by:
I able to redirect the user to the index.aspx page after every successful login, but I dont want certain pages outside the folder to have a access to general public. So if they click that...
3
5091
by: Mario | last post by:
Greetings! Here is the problem i'm facing. I'm supposed to read some user input on Page1, then, depends on what the user inputs, redirect him to Page2 or Page3 and send the entered data with it....
0
1937
by: daonho | last post by:
Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs) Dim strPath As String = HttpContext.Current.Request.Path() Dim cookie As...
3
3510
by: jasonheath.net | last post by:
I apologize in advance for the length of this post. I wanted to get as much detail as possible in here. We have 1 web app that contains the functionality to do some single sign-on logic. The...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7383
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3194
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.