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

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

P: n/a
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

Jul 12 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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


"j-in-uk" wrote:
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

Jul 12 '06 #2

P: n/a
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"] ?

Peter wrote:
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


"j-in-uk" wrote:
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
Jul 12 '06 #3

P: n/a
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" wrote:
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"] ?

Peter wrote:
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


"j-in-uk" wrote:
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
>
>

Jul 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.