Click here to Skip to main content
14,693,130 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am creating a website and i want to set session timeout.
But i don't have any idea to how to set session timeout, for example after certain time if user clicks any button or link it will go to login page automatically.
Help me.
Updated 6-Aug-19 21:09pm

Below is a sample config.web file used to configure the session state settings for an ASP.NET application:
      sqlconnectionstring="data source=;user id=<user id>;password=<password>"

Hope this will give an idea to you.
Well, you have two things here:
1. Detecting session timeout
2. Once it's a session timeout, direct user to login page.

Have a look at these:
Link 1[^]
Link 2[^]
Link 3[^]
Link 4[^]

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