Staying logged in problem!

Discussion in 'General troubleshooting' started by Fliteska, Feb 16, 2012.

  1. I have deployed a website using ASP.net but for some reason, every time I go to a protected page, I log in and then when I try to go to another protected page, I get logged out and have to log in again!

    Not sure what is causing it though, any ideas what could cause it?
     
  2. I'm experiencing the same thing - almost like the session drops. I was going to try playing with session settings in the web.config to see if that matters.

    The application I have is unusable without a reliable way to stay logged in.
     
  3. Elshadriel

    Elshadriel Winhost Staff

    Your application pool may be recycling causing you to lose the session information. We recycle your application pool under the following conditions:

    1) CPU usage of 75% or greater within a 5 minute period.
    2) Exceeding the memory limit for your site account (Dependent upon plan: Basic - 100MB, Max - 200MB, Ultimate - 300MB)
    3) Exceeding the Idle Timeout of 20 minutes.
     
  4. Last edited by a moderator: Oct 14, 2015
  5. ComputerMan

    ComputerMan Winhost Staff

    This seems like you are losing your sessions when the application pool is recycled.

    Our server will recycle your application pool automatically if you reach one of the conditions mentioned above.

    This means that you need to enable SQL Server sessions in order to keep your session from getting lost.

    Read our knowledge base article on How to enable ASP.NET SQL Server Session on your web application
     
    Last edited by a moderator: Oct 14, 2015
  6. You can try it

    I did try to deploy simple page log in create record and view that record, and I have same problem, so is not possible that application use more than 75% of CPU, or second or third issue.
    I also try Orchard portal and have the same result (expect when i retry again again and again in some case inserting record success).
    In my opinion i thing that the the problem should be some thing else and they should come with the solution and not workaround to use SQL Server session or we must try another Hosting.
     
  7. ComputerMan

    ComputerMan Winhost Staff

    Have you tried testing your web application on your local level to see if it does hit one of the conditions above?

    Try bring your whole site down to your local level to see how much resources it is using on your end. This will give you a good idea on why your application pool is recycling on our servers. In order to get the full scope of what resources you are using. You will need to bring all of the web applications you are hosting on our web servers and test it on your local environment.

    If you find that you are using quite a bit of memory in your web application pool. You can always try to upgrade your hosting plan to our Max plan that gives you 200 MB of memory until the application pool recycles. Or go for our Ultimate Plan. With the Ultimate Plan you will receive 300 MB of memory allocated to your web application pool. For more information please check out our hosting plans here: Winhost Hosting Plans

    To learn how to upgrade your hosting plan please read our knowledge base article here: How do I change the plan for my site (upgrade/downgrade)
     
    Last edited by a moderator: Oct 14, 2015

Share This Page