By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,426 Members | 3,407 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,426 IT Pros & Developers. It's quick & easy.

FormsAuthentication.RedirectFromLoginPage when no ReturnURL

P: n/a
I have a logon page that is may be called by the Forms Authentication setup.

This would put a ReturnURL as part of the URL. I would normally then just
issue a:

FormsAuthentication.RedirectFromLoginPage(logon.tx t,true)

But I also am giving them an option to register which would go to a new
page. From this page, when they submit, I want to go the original page they
were heading for (ReturnURL) when the went to the logon page.

What I am doing at the moment is putting the ReturnURL in a session cookie.
When I am done I would just do something like:

server.transfer(session("ReturnURL")).

The problem is that the logon cookie that
FormsAuthentication.RedirectFromLoginPage sets would not be set and when the
user goes to the next page, he would first go to the logon page.

I don't want that to happen. Is there a way to set the cookie the way that
FormsAuthentication.RedirectFromLoginPage does before I do the transfer?

Thanks,

Tom.
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
If I understand correctly, check out FormsAuthentication.SetAuthCookie:

http://msdn.microsoft.com/library/de...ookietopic.asp
Hope this helps,
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"tshad" <ts**********@ftsolutions.com> wrote in message
news:eO**************@TK2MSFTNGP10.phx.gbl...
I have a logon page that is may be called by the Forms Authentication setup.
This would put a ReturnURL as part of the URL. I would normally then just
issue a:

FormsAuthentication.RedirectFromLoginPage(logon.tx t,true)

But I also am giving them an option to register which would go to a new
page. From this page, when they submit, I want to go the original page they were heading for (ReturnURL) when the went to the logon page.

What I am doing at the moment is putting the ReturnURL in a session cookie. When I am done I would just do something like:

server.transfer(session("ReturnURL")).

The problem is that the logon cookie that
FormsAuthentication.RedirectFromLoginPage sets would not be set and when the user goes to the next page, he would first go to the logon page.

I don't want that to happen. Is there a way to set the cookie the way that FormsAuthentication.RedirectFromLoginPage does before I do the transfer?

Thanks,

Tom.

Nov 19 '05 #2

P: n/a
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2****************@tk2msftngp13.phx.gbl...
If I understand correctly, check out FormsAuthentication.SetAuthCookie:

http://msdn.microsoft.com/library/de...ookietopic.asp
That was what I was looking for.

Thanks,

Tom.

Hope this helps,
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"tshad" <ts**********@ftsolutions.com> wrote in message
news:eO**************@TK2MSFTNGP10.phx.gbl...
I have a logon page that is may be called by the Forms Authentication

setup.

This would put a ReturnURL as part of the URL. I would normally then
just
issue a:

FormsAuthentication.RedirectFromLoginPage(logon.tx t,true)

But I also am giving them an option to register which would go to a new
page. From this page, when they submit, I want to go the original page

they
were heading for (ReturnURL) when the went to the logon page.

What I am doing at the moment is putting the ReturnURL in a session

cookie.
When I am done I would just do something like:

server.transfer(session("ReturnURL")).

The problem is that the logon cookie that
FormsAuthentication.RedirectFromLoginPage sets would not be set and when

the
user goes to the next page, he would first go to the logon page.

I don't want that to happen. Is there a way to set the cookie the way

that
FormsAuthentication.RedirectFromLoginPage does before I do the transfer?

Thanks,

Tom.


Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.