Auto Logout when user idle
Categories: Authentication, State handling
|
Tags: Developers, Navigation, 2. Intermediate, 3. Advanced, ASP.NET, Pre v6.3, v6.3, v6.4 and Later
Revision:
1
Posted:
05/Jan/2009
Updated:
05/Jan/2009
Status:
Publish
Types: Article
|
The below code will logout the loggedin user when idle for the time specified Follow the below steps: 1. Declare a variable in web.config file to store the Auto Logout time. (Can use the convenient way to store the time value)
<appSettings>
<!-- Session Time out value is in minutes and could be changed to any desired value-->
<add key ="sessionTimeout" value ="10"></add>
</appSettings>
2. In the logon form use the below code
this.Context.HttpContext.Session.Timeout = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["sessionTimeout"]);
This will logout the user when idle for 10 minutes.
About the author
Related Articles
|
Authentication
|
|
|
Tags:
Developers, Navigation, 1. Beginner, 2. Intermediate, 3. Advanced, Integration, Navigation, ASP.NET, v6.3, v6.4 and Later
|
|
|
This video demonstrates how to create a logon form using the form authentication support in Visual WebGui
Tags:
Architects, Developers, Windows & Dialogs, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
This video demonstrates How to create a register form using Visual WebGui
Tags:
Architects, Developers, Windows & Dialogs, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
This video demonstrates How to create a register form using Visual WebGui.
Tags:
Architects, Developers, Windows & Dialogs, 1. Beginner, 2. Intermediate, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
This is a class to authenticate a user against Microsoft Active directory using the LDAP protocol.
Tags:
Architects, Developers, Visual WebGui Pipeline, VB.NET, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags:
Developers, Events, Navigation, 1. Beginner, 2. Intermediate, Navigation, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
|