redirect user to login after page has expired asp.net 2.0

J

j-in-uk

Hi,

I'm using the login control for asp.net 2.0.
Once a user logs in I want to set timeouts for certain pages not the
whole app,
so if the page they on has expired I want to redirect the user back to
login page.
I got the login control to work but need to know how to do the rest.
Do I use the Response.Cache.SetCacheability etc.
Any examples?

thanks
 
G

Guest

If you are using Forms Authentication and have set the timeout as you desire,
then if sombody leaves a page open and goes out for a nice spaghetti dinner,
when they come back they should automatically be redirected to the login page.
Peter
 
J

j-in-uk

Hi,

With forms authentication i have to specify the login etc. in the
web.config file, which I don't really want. This must only be applied
for about three pages of the site and then other pages from the site
also have different expiries. Do i create an
application["HRPages"] ?
 
G

Guest

j-in-uk,
You do not have to specify the login information in the web.config at all.
If you are using the Membership Provider, the login information comes from
your database that you have enabled for Membership and Roles. In ASP.NET 1.1
, you can also perform Forms Authentication against a database.

Here is an article that may help:

http://www.eggheadcafe.com/articles/20060529.asp

Peter


--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




j-in-uk said:
Hi,

With forms authentication i have to specify the login etc. in the
web.config file, which I don't really want. This must only be applied
for about three pages of the site and then other pages from the site
also have different expiries. Do i create an
application["HRPages"] ?
If you are using Forms Authentication and have set the timeout as you desire,
then if sombody leaves a page open and goes out for a nice spaghetti dinner,
when they come back they should automatically be redirected to the login page.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
 

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

Top