Click here to Skip to main content
15,880,967 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear friends,

how to set session timeout as 24hours, and where I place the code? and whenever session is completed i want redirect to login page.



Thanks in advance.
Posted
Comments
[no name] 26-Aug-14 4:31am    
increase ur session time out in web config.
Member 10021658 26-Aug-14 4:33am    
Thanks you response. I am sorry to say, i don't know to give the session. That's main problem.

Write This Code in Web.confilg file to extend sesion time

<configuration>
<sessionState timeout="129600"></sessionState>
</configuration>

add global.asax file in your solution explorer
Write This Code in Session_End() method of global.asax file to navigate login page

->> Response.Redirect("~/login.aspx");
 
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