Last post Jun 07, 2011 11:36 PM by Mamba Dai - MSFT
Jun 05, 2011 04:11 PM|marcin_tt|LINK
I configured session state in web.config like this:
I need users to log in before they access content and I need user sessions to ime out after few minutes of inactivity.
With above setting I can click after more than one minute and the user is NOT logged out - the session does not time out.
What am I missing?
Jun 06, 2011 03:28 AM|GPankaj|LINK
Did you put your login code in a Session like the steps shown below.
User Enters Username and password
User is validated against a database
if the user is valid then
Session["AuthenticatedUser"] = true
In the home page you can put a check like this
if Session["AuthenticatedUser"] is true then allow access if not then redirect to login page.
Now this value Session["AuthenticatedUser"] will be null after 1 minute of inactivity.
I suggest you use form authentication for login mechanism. Here is a link
Hope this helps
Jun 07, 2011 11:36 PM|Mamba Dai - MSFT|LINK
You may check this link below: