timing out the asp.net web application when not in use for 15 minutes

  • Thread starter Thread starter enahar
  • Start date Start date
E

enahar

Hi,

How to timing out the asp.net web application when not in use for 15 minutes
although I am using the code in web.config file as below:

<authentication mode="Forms">
<forms loginUrl="Security/Login.aspx" protection="All" timeout="20" path="/"
/>

</authentication>





Thanks
 
Why not change the web.config settings to 15 minutes? Otherwise, you could of
course save a timestamp in a session variable after login, create a base web
page and make every web page inherit from it. Add a method to the base web
page which checks if the timestamp is older then 15 minutes. If it is, call
Session.Abandon(); and do a Response.Redirect to your login form. Hth.

Kind regards,
Nikander & Margriet Bruggeman
 
Hi enahar:

Let me try to understand your question:

Do you want to have the application shutdown after 15 minutes of
inactivity?

or

Do you want to logoff a user after no activity from that one user for
15 minutes?
 
Hi scott,

I want to logoff a user after no activity from that one user for
15 minutes?
 
Enhar:

Have you tried setting the timeout attribute to 15? This will expire
the cookie after (roughly) 15 minutes of inactivity. Without the
cookie the user will no login be authenticated.
 
Hi
If I use
Response.AppendHeader("Refresh",Convert.ToString((Session.Timeout*60)+10)&";URL=Login.aspx")
in every page of the Page_Load then it will refresh the page irrespective of
whether activity is there or not.I want to refresh only when there is no
activity or not in use .

Thanks
 
Enahar..
U can write a Jscript for that or try googling for one.
Patrick
 

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

Back
Top