Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET .NET4 Telerik , +
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
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
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...
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
v2
Comments
psychic6000 at 25-Apr-13 3:02am
   
[I am using LINQ with connection string defined inside web.config]

1 solution

Rate this: bad
good
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"/>
  Permalink  
v2
Comments
psychic6000 at 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 at 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 at 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
0 OriginalGriff 270
1 Sergey Alexandrovich Kryukov 185
2 BillWoodruff 173
3 CPallini 155
4 Kamal Rocks 144
0 OriginalGriff 5,655
1 DamithSL 4,506
2 Maciej Los 3,997
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 25 Apr 2013
Copyright © CodeProject, 1999-2014
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