Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Dear Guys,
I am doing a project in c#.In that i am trying to find out whether the user is active on the page or not.Based on that, i am planning to put the session expired message.I have currently given one minute in the webconfig.So its automatically getting expired eventhough the user is active.Can you please suggest how to validate the client side active status

C#
<sessionstate mode="InProc" cookieless="true" timeout="1"></sessionstate>

<authentication mode="Forms">
<forms name="login" defaultUrl="~/default.aspx" loginUrl="~/default.aspx"
slidingExpiration="true" timeout="1" protection="All" path="/"></forms>
</authentication>
Posted
Updated 11-Apr-13 3:20am
v2
Comments
ZurdoDev 11-Apr-13 9:37am    
You need to keep a separate timer running in the client side if you want to be able to warn them when their session ends. Since the web is a disconnected medium you can't really keep track of it on the server.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900