ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل Noor Ali Chagani , Software Development Manager , The Punjab Healthcare Commission (PHC)
تاريخ النشر: 2014/05/27
مستخدم محذوف‎
من قبل مستخدم محذوف‎

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
من قبل 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
من قبل 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.

المزيد من الأسئلة المماثلة