Click here to Skip to main content
11,928,786 members (46,287 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET .NET VS2010 .NET4 , +
Hi Everyone,
I have this problem with website application, coming to point, my exact problem is i get session expired and app pool recycled, which deletes all of my page progress and etc, firstly i was using my sign info in session, though now i am also storing it in cookies, so when the session expires, application restores the login info from cookies.

Session.Add("sUserID", src.userID);
Session.Add("suserLname", src.userLName);
Response.Cookies["abcdefCookie3"].Value = src.userID;
Response.Cookies["abcdefCookie3"].Expires = DateTime.Now.AddDays(1);
Response.Cookies["abcdefCookie4"].Value = src.userFName;
Response.Cookies["abcdefCookie4"].Expires = DateTime.Now.AddDays(1); 

but the other information like datatables in session, which of course gets lost with so called app pool recycling...

It Runs fine on LOCALHOST but on hosting services i have been facing this issue, i have these tried these hosters
1. One&One Website hosting
2. HostMySite
3. SiteGator
4. CreativeOn

i thought it might be overflowing memory with a lot of session variables so i deployed a middle page (navigator) in which i used following code
string frwdAdd = Request.QueryString["frwdAdd"];
string sUserID = (string)Session["sUserID"];
string suserLname = (string)Session["suserLname"];
Response.Redirect("~/" + frwdAdd, true);
using this i did get a little bit more time before session expired/app pool recycled, but eventually it expires...
so guys any hint, any link, any help would be appreciated A LOT.
Posted 24-Apr-13 20:12pm
Edited 24-Apr-13 20:34pm
psychic6000 25-Apr-13 3:02am
[I am using LINQ with connection string defined inside web.config]

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

for application pool set the pool size in IIS
and use web config file to configure the session timout
;Max Pool Size=75000"/>
psychic6000 25-Apr-13 1:43am
i have set the session time out to at least 20 min in web.config (i also tried 120 min etc). but how can i set the pool size in online hosting space???
psychic6000 25-Apr-13 2:48am
I am using a web hosting, in which they dont allow me to configure IIS Pool, or i cannot find it in their online interface for management...
Tshencho 25-Apr-13 3:22am
M too having same problem. some time it expires within a second. any body having a solution please help!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 25 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100