Solved

.Net session timeout in webfarm environment

Posted on 2013-05-10
5
648 Views
Last Modified: 2013-05-14
Hello, I have an website build in .net 3.5 and C#, with session timeout set to 60 minutes
But, when hosted within an web farm, the session expires invariably in 20 minutes.

<sessionState mode="InProc" timeout="60" cookieless="false" cookieName="training" regenerateExpiredSessionId="true">
		</sessionState>

Open in new window


I have tried also with mode="StateServer", as stated here , same result.

What should I do more to keep session alive for 60 minutes?

Thanks,
Daniel
0
Comment
Question by:danielivanov2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 23

Expert Comment

by:Ioannis Paraskevopoulos
ID: 39157639
Hi,

You may need to change mode from InProc to SQLServer.

Giannis
0
 
LVL 16

Expert Comment

by:Rose Babu
ID: 39160889
can you check whether the timeout has been set to 60 minute in the website's application pool settings?

have a look on the below link to check the idle timeout value

http://bradkingsley.com/iis7-application-pool-idle-time-out-settings/

<sessionState mode="InProc" 
        timeout="60" 
        cookieless="false" 
        cookieName="training" 
        regenerateExpiredSessionId="true">
</sessionState>

Open in new window

0
 

Author Comment

by:danielivanov2
ID: 39160934
I am not able to see and /or modify the application pool, since this feature is reserved to hosting company.

They said the followings are set, after asking: "what is the default value for application pool recycling (in Mb and / or minutes)?":

 
Private Memory Limit : 200 MB
Regular Time Interval : 60 min
Virtual Memory Limit : unlimited

I'm still awaiting for a response from them regarding using SqlServer session mode.
But, in case the SqlServer session mode is not an option, what else should I do?

Thanks
0
 
LVL 16

Expert Comment

by:Rose Babu
ID: 39163843
oh...k. i thought you have IIS root access.

To store the asp.net sessions in SQL  server, have a look on the below tutorials which may help you a lot

http://www.codeproject.com/Articles/104082/Configuring-ASP-session-state-on-SQL-server

http://support.microsoft.com/kb/317604

http://idunno.org/articles/277.aspx
0
 
LVL 16

Accepted Solution

by:
Rose Babu earned 315 total points
ID: 39163848
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question