9 Replies - 8290 Views - Last Post: 28 November 2008 - 03:44 PM Rate Topic: -----

#1 Sim270  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 04-July 07

Problem with Session Timeout

Posted 22 October 2007 - 09:38 PM

Hi,
I am having one asp.net application for which i have set the session timeout as 600 mins in the web.config file.

<sessionstate mode="InProc" cookieless="false" timeout="600"/>

But somehow the session is getting cleared after 25-30 mins.

can anobody help in this regard?

Thanks in advance.......
Is This A Good Question/Topic? 1
  • +

Replies To: Problem with Session Timeout

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Problem with Session Timeout

Posted 23 October 2007 - 05:42 AM

It sounds like you session settings are being overridden in IIS
Was This Post Helpful? 0
  • +
  • -

#3 Sim270  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 04-July 07

Re: Problem with Session Timeout

Posted 23 October 2007 - 05:48 AM

View PostPsychoCoder, on 23 Oct, 2007 - 05:42 AM, said:

It sounds like you session settings are being overridden in IIS


Hey thanks a lot for the reply...
But i checked with the server administrator...according to him it is set as default 20 mins in IIS and for my application session is getting lost after 30 mins or so.......
Was This Post Helpful? 0
  • +
  • -

#4 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Problem with Session Timeout

Posted 23 October 2007 - 06:00 AM

What is happening to tell you the session is timing out? Are you being redirected back to the login page after a certain time?
Was This Post Helpful? 0
  • +
  • -

#5 Sim270  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 04-July 07

Re: Problem with Session Timeout

Posted 23 October 2007 - 06:07 AM

View PostPsychoCoder, on 23 Oct, 2007 - 06:00 AM, said:

What is happening to tell you the session is timing out? Are you being redirected back to the login page after a certain time?



Actually i am storing some data in the session variables ....after the application is idle for some time that data is not being displayed on the form ...... from which i figured it out that session is getting lost......
Was This Post Helpful? 0
  • +
  • -

#6 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1641
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Problem with Session Timeout

Posted 23 October 2007 - 06:17 AM

You need to talk to the administrator for your server and see if they're cycling their application pools about every 30 minutes, which would explain you loosing session values after 30 minutes. When an application pool is cycled it wipes everything out in that pool, including sessions values, then starts over again.
Was This Post Helpful? 0
  • +
  • -

#7 Sim270  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 16
  • Joined: 04-July 07

Re: Problem with Session Timeout

Posted 23 October 2007 - 06:25 AM

View PostPsychoCoder, on 23 Oct, 2007 - 06:17 AM, said:

You need to talk to the administrator for your server and see if they're cycling their application pools about every 30 minutes, which would explain you loosing session values after 30 minutes. When an application pool is cycled it wipes everything out in that pool, including sessions values, then starts over again.

Thanks but unfortunately this also is not the cause of the problem :(.I checked with the administrator for the same.no recycling has been done....
Was This Post Helpful? 0
  • +
  • -

#8 sontek  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 8
  • View blog
  • Posts: 283
  • Joined: 13-September 01

Re: Problem with Session Timeout

Posted 26 October 2007 - 04:55 PM

Can you do a Response.Write(Session.Timeout) to see what the actual value is?

and are you sure the values aren't being cleared in code somewhere? Can you make a small web example to test? Can you paste the code here?
Was This Post Helpful? 0
  • +
  • -

#9 ratkiley  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-August 08

Re: Problem with Session Timeout

Posted 08 August 2008 - 11:14 AM

The user Sessions, the Application, and other objects in the Httpcontext.Current like the Cache are wiped clean when you modify a file in the App_Code folder or when you modify the web.config file for the web site.
Was This Post Helpful? 0
  • +
  • -

#10 johnly  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 28-November 08

Re: Problem with Session Timeout

Posted 28 November 2008 - 03:44 PM

I will suggest you to change your code like this.

<sessionState
mode="StateServer"
cookieless="false"
timeout="600"/>

Here I have changed the session state to a seperate worker process (ASP state management server).

It is recommended to move your session into the stateserver or SQL server state management in the production environment.

Note: You need to start the 'ASP.NET State Service' windows service on the web server in order to make this code work.

This may solve your problem

Johnlee Sam
FMCG Directory

View PostSim270, on 22 Oct, 2007 - 08:38 PM, said:

Hi,
I am having one asp.net application for which i have set the session timeout as 600 mins in the web.config file.

<sessionstate mode="InProc" cookieless="false" timeout="600"/>

But somehow the session is getting cleared after 25-30 mins.

can anobody help in this regard?

Thanks in advance.......

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1