Avoiding session activity?

G

Guest

I have a web page which is periodically refreshing itself with data from the
server. However I dont want this activity to counted towards the session's
"activity counter" i.e. if a user does nothing on the page for 20 mins then I
want the session to time out even though the page has been refreshing itself
in the background.

Any ideas?
 
G

Guest

It seems that you want to override behaviour of a session object...
Look into Session and Authenticate events in Global.asax file, maybe you
could provide your session expiration logic there. Also you might want to
invistigate custom HTTP handlers modules.
 
P

Paul Glavich [MVP - ASP.NET]

If you are using session variables to populate the page on each refresh it
makes it a bit hard (as each refresh will access the session vars). You will
need someway to distinguish between an automated refresh via the client side
timer, and actual activity. You'll probably need to make sure that session
is not used to populate the page, or that session is used on inital load and
the "refresh" is done really as a postback with a special argument, and
viewstate is used to maintain the screen state.
 

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

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top