views:

135

answers:

3

I intend notifying the user 60 seconds before the session expires in asp.net. I would like the user to choose to renew the session or ignore the notification.

How can I achieve this in asp.net?

+1  A: 

First result from google

Session.Timeout and Notification Before Session Expire

rahul
+2  A: 

When the page loads, you can set a javascript timeout to popup in the appropriate amount of time. It's not perfect, but probably good enough.

setTimeout("sessionAlmostGone()", 10 * 5 * 1000);
Noon Silk
+1  A: 

HTTP protocol doesn't provides way to push client, only pull allowed. Your task looks as "push" notification to client.

Instead use JScript-based timer on client side that after expiring timeout shows message about renewing session. If so AJAX allows you notify server to prolong or close session.

Dewfy