Intermittent connection interruptions?

Discussion in 'General troubleshooting' started by MediaThrall, Jul 11, 2010.

  1. The users of my website are reporting intermittent drops - their sessions are being interrupted and they're being logged out of their accounts. The drops are quick - they seem to happen instantly, and it drops all the users of the site. The drops do not cause any down time, however. The frequency of these drops has increased over the last two days (as has my user base).

    Anyone have any ideas what might be causing this? Is it a potential issue with my deployed site? Something I can fix?

    Thanks!
     
  2. I had this issue (if I'm understanding you correctly), and what you need to do to fix it is to set the machine key explicitly in your web.config. Winhost's machine key keeps changing (probably because they are running a web farm) and because your app uses the machine key to encrypt the cookies it sets on the users' browsers, the changing of the machine key causes them to seem to log out.

    About machine keys: http://msdn.microsoft.com/en-us/library/ff649308.aspx
    You can generate machine keys here: http://www.developmentnow.com/articles/machinekey_generator.aspx
     
    Last edited by a moderator: Oct 14, 2015
  3. Ray

    Ray

    No we are not running a web farm, but we do have several conditions and thresholds that we implement to protect the server so that no single web application consumes all of its resources. This will have a negative impact on the websites we host. If any account/site reaches these thresholds, their application pool will get recycled and thus the machine key will be lost. Thus setting a predefined machine key rather then letting the system auto generate it a good alternative.
    Secondly, sessions can be store on the SQL server. It does not have to be store on the web server. Try looking at this kb article.

    http://support.Winhost.com/KB/a626/how-to-enable-aspnet-sql-server-session-on-your-web.aspx

    Bear in mind that machine keys are different from Sessions. Sessions can be saved off the web server, machine keys can't. So if you application uses both you will need to implement two different solutions.
     
    Last edited by a moderator: Oct 14, 2015

Share This Page