Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.

C#
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
and
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

C#
string frwdAdd = Request.QueryString["frwdAdd"];
string sUserID = (string)Session["sUserID"];
string suserLname = (string)Session["suserLname"];
Session.Clear();
Session.Add("sUserID",sUserID);
Session.Add("suserLname",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...
<big>so guys any hint, any link, any help would be appreciated A LOT.</big>
Posted
Comments
Prasad Khandekar 28-Apr-13 12:13pm    
Please have a look at this thread (http://stackoverflow.com/questions/302110/what-causes-an-application-pool-in-iis-to-recycle) to get more info on this.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900