Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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

user-image
Question added by Noor Ali Chagani , Software Development Manager , The Punjab Healthcare Commission (PHC)
Date Posted: 2014/05/27
Deleted user
by Deleted user

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
by 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
by 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