Increase session timeout of asp.net login control

by rezashirazi 11/10/2008 12:25:00 PM

If you use ASP.NET login control in your website, by default login session of your accounts expired after 20 minutes. For increasing session timeout there are some different methods but the simpleset methos is change your website configuration in web.config file. you have to add below data in your web.config file for this reason:

<sessionState mode ="InProc" timeout="540"/>

<httpRuntime executionTimeout="999999"/>

but If you are using Asp.net login control your session timeout problem exists after these changes. for increasing session timeout of asp.net login control change authentication tag in your web.config to below tag:

<authentication mode="Forms"> <forms timeout="540" slidingExpiration="true" loginUrl="~/Login.aspx" />

</authentication>

Your session expiration time is now 9 hours(540 minutes)! Smile

Related posts

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

7/4/2009 3:18:26 AM

About the author

Name of author Reza Shirazi Mofrad
Interests: Image processing, computer vision, Artificial intelligence, Microsoft .NET technologies, Web programming.

E-mail me Send mail

Calendar

<<  July 2009  >>
MoTuWeThFrSaSu
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

Site statistics

Tags

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009

Sign in