ASP.Net Session breaks down

Discussion in 'Site Programming, Development and Design' started by MadLuke, Feb 17, 2011.

  1. Hi to all of you,
    for my web application I set the Session timeout to 20 minutes. I realized a javascript function also that just after 19 minutes alerts the user his session is about to expire. Well, it doesn't work!

    While I surf on the application on my local PC everything's fine: session work for 19 minutes and the the alert is shown. But I put the code on Winhost server and most of the times the doesn't display even, simply I click on a link and I'm redirected to my courtesy page cause session expired.

    I read InProc session aren't safe as SQL Server ones, but mine is just a small website, with no more then 20 users at the same time. So I suspect it's just a Winhost server bug, isn't true?

    Best greetings, Luca.
     
    Last edited by a moderator: Oct 14, 2015
  2. Ray

    Ray

    What error message are you getting? It also sounds like you maybe hitting the threshold set on the server. There are 3 conditions/thresholds set on the server to protect itself from one single application consuming all of the servers resources. If we do not have these conditions, a single application can make the server come to a halt which will negatively impact the other sites we host. The conditions are...


    1) More than 20 minutes of idle time (no http request in 20 minutes)
    2) The application uses more than 100 MB memory on the Basic plan and 200 MB on the Max and Ultimate plans.
    3) The application uses more than 75% of CPU time
     
  3. As first statement of every page of my asp.net application (registerd user area only) I check the value of the "UserID" session variable, and if it is an empty string then the server redirect to the courtesy page (otherwise page routine continues normally).

    This sometimes happens just after 4-5 minutes even, this' not right in my opinion (however whe I try the application on development environment on my local PC no problems occurs).

    My site is just a small application, no one of the three condition you specified is possible it occurs, I could swear.

    Thank you for your haste reply, L.
     
  4. Ray

    Ray

    --no one of the three condition you specified is possible it occurs

    Try not to think that way. You'll be surprise on just how bloated a site may become. The best thing to do is to open a support ticket and ask them to verify if your application pool is being recycled by the server. Make sure you open the ticket from within your control panel. Also to help them troubleshoot the problem make sure you give the the URL and detailed instructions on how to replicate the problem. Include any test account if needed.
     
  5. Last edited by a moderator: Oct 14, 2015

Share This Page