Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my mvc application I want to maintain the session timeout in code behind file.how to do it please help me.
Posted

In the "web.config" file write this code
<system.web>
<sessionState timeout="1">
</system.web>
In this code timeout="1" specifes that after 1 minute the session will be expire. If we not specify the time then by default the time for expiring the session is 20 minutes.
 
Share this answer
 
v2
Have a look at the HttpSessionState.Timeout property[^].
This can be set in the global.asax file.
 
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