Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the maximum timeout attribute value for Session in ASP.NET?

user-image
Question ajoutée par Noor Ali Chagani , Software Development Manager , The Punjab Healthcare Commission (PHC)
Date de publication: 2014/05/27
Utilisateur supprimé
par Utilisateur supprimé

There are different types of Session-State Modes. So the maximum Timeout value for Session differs accordingly. For details on types of Session-State Modes refer : http://msdn.microsoft.com/en-us/library/vstudio/ms178586%28v=vs.100%29.aspx

 

 

For InProc and StateServer mode the maximum timeout value is equal to one year

i.e.  (60 minutes X 24 hours X 365 days = ) 525600

 

Note :Here one year is a normal year i.e. never a leap year. So, (60 minutes X 24 hours X 366 days = ) 527040 will throw exception. Infact 525601 will also throw exception.

 

 

For remaining types of Session-State Modes where session stores some values the maximum value is (int.MaxValue) the max value of an int data type, because Session.Timeout accepts int values.

 

Jahangir Shahzad
par Jahangir Shahzad , Advisory Software Engineer , Systems Limited

The Timeout property cannot be set to a value greater than525,600 minutes (1 year). The default value is20 minutes.

Furqan Ul Karim
par Furqan Ul Karim , Senior Delivery Manager (Contract) , Virgin Red

Well as stated above by Vikram that it depends but for default session (in proc) default session timeout is20 minutes.

More Questions Like This