M
Mark Teague
Greetings MS ASP.Net Community,
I am using forms authentication for a site we've been developing. All users
valid on our Windows domain are eligible to access the site, but are
enrolled in the application upon initial login by insertion of a record into
a [User] table located in a SQL Server database. Insertion of this record
creates an "anonymous" machine generated user ID for them. (The system is a
ride sharing / carpool application and implements a double blind messaging
feature.) New users are also required to agree to the "Terms of Service"
that our legal dept. has composed for this application. So, the login form
is taking care of all of this for me. It only grants an authentication
ticket after verifying that:
1. the user is on the domain
2. the user has been enrolled by insertion into the [User] table
3. the user has agreed to the current "Terms of Service"
Normally, an existing user is redirected from login to a default page
showing their matching commuters (where they can message potential matches
anonymously, etc.) However, when the user is a brand spanking new user who
is accessing the site for the first time I would like to redirect them from
the login page to a "welcome" page that informs them about their anonymous
ID and the double-blind messaging feature, etc.
The problem I seem to have is that when I manually add the cookie for the
authentication ticket to the outgoing cookies collection and try to invoke a
statement such as:
Response.Redirect("Welcome.aspx", False)
the user is not redirected, but receives the login page again.
Is it possible to redirect from the login page to a page other than the one
requested by the user ... i.e. FormsAuthentication.GetRedirectURL()?
Seemingly, I can only redirect the user from the login page via:
FormsAuthentication.RedirectFromLoginPage()
Ok, I think that pretty much sums it up.
Any help will be greatly appreciated.
Sincerely,
Mark
I am using forms authentication for a site we've been developing. All users
valid on our Windows domain are eligible to access the site, but are
enrolled in the application upon initial login by insertion of a record into
a [User] table located in a SQL Server database. Insertion of this record
creates an "anonymous" machine generated user ID for them. (The system is a
ride sharing / carpool application and implements a double blind messaging
feature.) New users are also required to agree to the "Terms of Service"
that our legal dept. has composed for this application. So, the login form
is taking care of all of this for me. It only grants an authentication
ticket after verifying that:
1. the user is on the domain
2. the user has been enrolled by insertion into the [User] table
3. the user has agreed to the current "Terms of Service"
Normally, an existing user is redirected from login to a default page
showing their matching commuters (where they can message potential matches
anonymously, etc.) However, when the user is a brand spanking new user who
is accessing the site for the first time I would like to redirect them from
the login page to a "welcome" page that informs them about their anonymous
ID and the double-blind messaging feature, etc.
The problem I seem to have is that when I manually add the cookie for the
authentication ticket to the outgoing cookies collection and try to invoke a
statement such as:
Response.Redirect("Welcome.aspx", False)
the user is not redirected, but receives the login page again.
Is it possible to redirect from the login page to a page other than the one
requested by the user ... i.e. FormsAuthentication.GetRedirectURL()?
Seemingly, I can only redirect the user from the login page via:
FormsAuthentication.RedirectFromLoginPage()
Ok, I think that pretty much sums it up.
Any help will be greatly appreciated.
Sincerely,
Mark