Requesting Page??

C

Charles A. Lackman

Hello, I have made an aspx web application that is using Forms
Authentication. Each unsecure page has a custom user control on it that
will allow the visitor to login and enter secure pages. The question I have
is within the Web.Config file.

under <authentication mode="Forms">
there is "LOGINURL"
because there is not a specific LoginPage I want the user to be redirected
back to the requesting page they attempted the logjn from. Is there a trick
to make this happen? Thanks

Chuck
 
E

e

Well, you could track the last known accessed unsecure page in a session
variable. Every time the user visits an unsecure page, you update the
variable to reflect that page. Then when the default loginurl is triggered
when the user tries to access a secure page (this will always happen if you
have forms auth turned on), you'll create a small login page that doesn't
really log in, it just forces a redirection to the page in the session
variable. That way, you get back to your unsecure page with user control
login.

But why? Normal forms authentication can work just fine with a default
loginurl specified in web.config.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top