Karthik Malla
Karthik Malla

Reputation: 5800

Problem with session timeout in C#

In my web.config file I tried Session.Timeout="1" and found working. Later I tried Session.Timeout="20160". Even if I give such a large number my website "Session Transfers" are being expired in 15-20mins. Do I need to change any settings in IIS? I am using windows 2003 server.

Upvotes: 4

Views: 2867

Answers (4)

Gage
Gage

Reputation: 7493

Seems like session timeout has a max of 24 hours. Check this out http://support.microsoft.com/kb/233477

Set it to 24 hours or less and you will be fine.

Also explained here: http://msdn.microsoft.com/en-us/library/ms525473(v=vs.90).aspx

IIS 6.0: The minimum allowed value is 1 minute and the maximum is 1440 minutes.

Upvotes: 0

user831055
user831055

Reputation:

define in the web configuration file:

<sessionstate 
      mode="inproc"
       cookieless="false" 
      timeout="20" 
     />

Upvotes: 2

Ovais Khatri
Ovais Khatri

Reputation: 3211

check this :

http://forums.asp.net/t/1283350.aspx

Upvotes: 0

Saeed Neamati
Saeed Neamati

Reputation: 35822

define in here in web.config file:

 <system.web>
     <authentication mode="Forms">
         <forms timeout="50" />
     </authentication>
 </system.web>

Upvotes: 0

Related Questions