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

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
 
G

Guest

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
 
S

Scott Allen

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?
 
E

Ekta Agarwal

Hi scott,

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

Scott Allen

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.
 
E

enahar

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
 
P

Patrick Olurotimi Ige

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

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top