Spontaneous Logout

Last post 04-17-2006 7:37 PM by jmorrissette. 37 replies.

Sort Posts:

  • Spontaneous Logout

    08-29-2005, 10:15 PM
    • Member
      265 point Member
    • rickla1
    • Member since 07-23-2005, 4:26 PM
    • Oregon
    • Posts 53
    Hi All, 
         I'm running 3.1 on Brinkster, and am experiencing spontaneous logouts.  Doesn't seem to matter what I'm working on, I click Update, Cancel, Delete or whatever and I'm faced with having to login again.  Sometimes the changes are saved, sometimes not.  Quite irritating tho....  After scanning 100+ forum search pages for "logout" I found one possible solution in a post.
     
    Quote...
    "I came up with this simple test-I added the following line to the end of default.aspx:

     <% Session("KeepAlive") = DateTime.Now %>

     Since then there has been zero occourence of this issue."

         I'm a newbie at asp & .net, so here's the dumb question.....Exactly where to add the line??  I tried it as the very last line, and as the last line in the body, with no success.  Please point me in the right direction. 

    I also changed the timeout settings I found in the web.config to larger values.  Or is there something else I should be looking at?

    Thanks for your help.




  • Re: Spontaneous Logout

    08-30-2005, 8:34 AM
    • Star
      13,648 point Star
    • cathal
    • Member since 06-18-2002, 4:02 PM
    • Belfast, Northern Ireland
    • Posts 2,702
    • TrustedFriends-MVPs
    add it as the third line, just before the doctype line (make sure it's the aspx page and not the aspx.vb). The reason this is needed, is that brinkster are using webfarms, and aren't setup correctly for use with Dotnetnuke (or lots of other applications that use similar security models)

    Cathal
  • Re: Spontaneous Logout

    08-30-2005, 12:24 PM
    • Member
      265 point Member
    • rickla1
    • Member since 07-23-2005, 4:26 PM
    • Oregon
    • Posts 53
    Thank you cathal.  I really appreciate your assistance, as well as all the help I get from the ASP.NET folks.  Everyone's been great at providing a helping hand to newbies like me.  Makes the learning process much easier!

    I inserted the line where you specified, and have been trying out everything.  Unfortunately the problem persists.  If anyone has any other suggestions, please send them my way.  I'll try just about anything at this point (except giving up)!

    My next step this morning will be to contact Brinkster support to see what they say about it, though I don't hold much hope they will be able to solve this.  They do a better job than 1and1, who I dropped within the first week!  If I had a decent ISP here in the toolies where I live, I'd be doing this on my own server where I had very few problems with a DNN installation working properly.

    Thanks again,
    rickla1
  • Re: Spontaneous Logout

    08-30-2005, 3:28 PM
    • Contributor
      6,887 point Contributor
    • mathisjay
    • Member since 12-05-2002, 11:34 AM
    • Atlanta
    • Posts 1,376
    Check your event log to see if the application pool is recycling.  If it is, it will invalidate your cookie and cause you to have to re-login again.  May provide a clue as to what's happening.
  • Re: Spontaneous Logout

    08-30-2005, 5:52 PM
    • Member
      265 point Member
    • rickla1
    • Member since 07-23-2005, 4:26 PM
    • Oregon
    • Posts 53
    Thanks mathisjay,
         I can see events showing "Application Started" and "Application Shutting Down" numerous times within a period of a couple minutes.  Would that be an indication of recycling?
         In the last 20 minutes though, I've been logged out involuntarily 4 times, but there's nothing in the log for that time, except showing I've logged in!  Twice it happened while editing my blog, and twice adding events to the Enterprise Events module.
         There seems to be no rhyme, reason or pattern to these logouts, except that I'm making some change somewhere.  I'll continue monitoring the log for clues, but for now call me.....

    Clueless!

    Thanks.

    Here's an afterthought:  With my crappy ISP, I may have a corrupted file (on upload).  How would I go about checking the integrity of my files?  Or am I better off wiping what I have and starting over?
  • Re: Spontaneous Logout

    08-30-2005, 6:53 PM
    • Contributor
      6,887 point Contributor
    • mathisjay
    • Member since 12-05-2002, 11:34 AM
    • Atlanta
    • Posts 1,376
    If you see "application shutting down" and "application started", that means the application process got restarted.   That will invalid your cookie since its session specific and thus make you log in again.

    However, if you are on webfarm, I suspose there could also be an issue with your request being passed around to different servers and them not being able to use the same sessionid.  This would also invalid your cookie.

    The applicaiton stop and start is real problem in itself as this means IIS is having to reload all the .dlls and that can take 15-20 secs.  This definitely should not be happening several times a minute.  Very very bad.

    I would look for a new host if I were you.
  • Re: Spontaneous Logout

    08-30-2005, 6:54 PM
    • Contributor
      6,887 point Contributor
    • mathisjay
    • Member since 12-05-2002, 11:34 AM
    • Atlanta
    • Posts 1,376
    Who is your host?
  • Re: Spontaneous Logout

    08-30-2005, 7:43 PM
    • Member
      265 point Member
    • rickla1
    • Member since 07-23-2005, 4:26 PM
    • Oregon
    • Posts 53
    Brinkster.  I contacted them this morning regarding this.  They say I'm not on a webfarm, and to contact the vendor for further application support.

    The more I think about it, I had a timeout during my uploading of DNN, due to my sorry dsl provider.  That prolly corrupted a file.  If I can't verify my installation files, I may just start over.

    I'm hoping to not have to switch hosts again.  It's a major pain and my customers may leave after another episode like I had with 1and1, where they were down for a week!  Right now their sites are up & running (they're not DNN).  Got a rash from them last time!

    Thanks...
  • Re: Spontaneous Logout

    08-30-2005, 8:02 PM
    • Star
      13,648 point Star
    • cathal
    • Member since 06-18-2002, 4:02 PM
    • Belfast, Northern Ireland
    • Posts 2,702
    • TrustedFriends-MVPs
    rickla1,
    we don't use sessions in dotnetnuke, so IMHO the trick with the sessions that helps the sites work on brinkster does involve some sort of multi-server setup ( It may not be a webfarm, but they made be using round robin DNS to provide load balancing). Either way, the only thing sessions would do is force session affinity i.e. subsequent requests from the same client go to the same machine. In DNN the authentication information is stored in a cookie when you've succesfully logged in. To protect this cookie, it is both signed with the unique MAC address of the server, as well as encrypted. If during subsequent requests, your request is sent to a different server, that server will not have the same MAC address, unless it's been set to be the same in both servers machine.config. I suspect this is what's happenening, but without inner knowledge of Brinkster, I can't say for sure. Possibly all this is a red herring, but as I've seen a number of succesful reports of Brinkster problems going away with the addition of the session variable, I'm be fairly sure that this is the case, which would indicate that their support staff lack this basic information.

    Cathal
  • Re: Spontaneous Logout

    08-30-2005, 8:57 PM
    • Member
      265 point Member
    • rickla1
    • Member since 07-23-2005, 4:26 PM
    • Oregon
    • Posts 53
    Thanks cathal.

    Where/how would I add a session variable?  Would I just enable webfarm support in the web.config?
  • Re: Spontaneous Logout

    08-30-2005, 9:18 PM
    • Star
      13,648 point Star
    • cathal
    • Member since 06-18-2002, 4:02 PM
    • Belfast, Northern Ireland
    • Posts 2,702
    • TrustedFriends-MVPs
    Just put it in the default.aspx as per your first post (note the syntax must be exact i.e. the "<%" is the start of the strong and the "%>" is the end).

    Don't enable webfarm support in the web.config. There is support in DotNetNuke for 1 particular webfarm scenario (you can read about it in the docs), but without knowing what setup brinkster use you can't jump to the assumption that they're setup as per our  supported scenario.

    Cathal
  • Re: Spontaneous Logout

    08-30-2005, 9:56 PM
    • Member
      265 point Member
    • rickla1
    • Member since 07-23-2005, 4:26 PM
    • Oregon
    • Posts 53
    Cathal,
         I much appreciate your help.  But it seems the more I learn, the dumber I get!  Would you be so kind as to write out the syntax I need to do this?  Thank you.

    rickla1
  • Re: Spontaneous Logout

    08-31-2005, 1:28 AM
    • Member
      15 point Member
    • rwalker54
    • Member since 08-31-2005, 5:25 AM
    • Posts 3
    I am in the same boat with Brinkster. Let me know if you get the spontaneous logout resolved!
  • Re: Spontaneous Logout

    08-31-2005, 9:04 AM
    • Star
      13,648 point Star
    • cathal
    • Member since 06-18-2002, 4:02 PM
    • Belfast, Northern Ireland
    • Posts 2,702
    • TrustedFriends-MVPs

    All, I'd suggest the best way forward would be for you to post this request to the original thread(s) that contained the session suggestion, and see if one of them can post you the sample, or let you download a copy.


    Cathal

  • Re: Spontaneous Logout

    08-31-2005, 11:12 AM
    • Member
      265 point Member
    • rickla1
    • Member since 07-23-2005, 4:26 PM
    • Oregon
    • Posts 53
    Thanks everyone,

    I'll continue to search for a solution, at least until I determine that it is, indeed, a problem at Brinkster.  If that's the case I'll have no choice but to change hosts again.  I'm still under the 90 day guarantee with them, thank goodness.

    Meanwhile, thinking I may have a corrupt file, I did an upgrade install to the latest release, hoping that overwriting the files would clear up my problem.  Didn't change---still getting logged out spontaneously!

    I'll post a solution soon as (if) I find one.   Still open to any thoughts or suggestions anyone out there may have.

    Extra thanks to Cathal for your time & input!

    rickla1
Page 1 of 3 (38 items) 1 2 3 Next >