Session resetting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • No One

    Session resetting

    This seems to be related to the ViewState error that is now starting to
    plague ASP.Net apps. When the Application Pool is recycled, the Session
    seems to be getting reset. When this is done, session information is
    lost and my app forgets what rules a user has. I'd rather not recode to
    read this from the database for every page, but I wonder if I have no
    other choice. Anyone else notice the Session resetting?
  • Brock Allen

    #2
    Re: Session resetting

    The ASP.NET worker process recycles for various reasons and it happens more
    often that people would expect. You have to design/code for it, including
    the possibility of InProc session being lost. To save session, keep it out
    of the worker process via the State Server or the Sql DB, or just don't use
    Session state which is somtimes possible, depending upon what you're doing.

    -Brock
    DevelopMentor



    [color=blue]
    > This seems to be related to the ViewState error that is now starting
    > to plague ASP.Net apps. When the Application Pool is recycled, the
    > Session seems to be getting reset. When this is done, session
    > information is lost and my app forgets what rules a user has. I'd
    > rather not recode to read this from the database for every page, but I
    > wonder if I have no other choice. Anyone else notice the Session
    > resetting?
    >[/color]



    Comment

    • No One

      #3
      Re: Session resetting

      How do I use State Server or SQL DB?

      Once a user is logged in, is there any other way of knowing who they
      are? I have a roles (not rules...typo) based system where each role is
      assigned various privileges. Certain pages require certain privileges
      and so do certain controls.

      Thanks.

      Brock Allen wrote:
      [color=blue]
      > The ASP.NET worker process recycles for various reasons and it happens
      > more often that people would expect. You have to design/code for it,
      > including the possibility of InProc session being lost. To save session,
      > keep it out of the worker process via the State Server or the Sql DB, or
      > just don't use Session state which is somtimes possible, depending upon
      > what you're doing.
      >
      > -Brock
      > DevelopMentor
      > http://staff.develop.com/ballen
      >
      >
      >[color=green]
      >> This seems to be related to the ViewState error that is now starting
      >> to plague ASP.Net apps. When the Application Pool is recycled, the
      >> Session seems to be getting reset. When this is done, session
      >> information is lost and my app forgets what rules a user has. I'd
      >> rather not recode to read this from the database for every page, but I
      >> wonder if I have no other choice. Anyone else notice the Session
      >> resetting?
      >>[/color]
      >
      >
      >[/color]

      Comment

      • Daniel Walzenbach

        #4
        Re: Session resetting

        This is just a setting in the web.config. If you want to use State Server be
        sure that the service is running (ASP.NET State Service), if SQL Server is
        your choice run InstallSQLState .sql in
        windows\Microso ft.NET\Framewor k\VERSION\ once.

        HTHs

        Daniel


        "No One" <aintnoway@blah blahblah.com> schrieb im Newsbeitrag
        news:kh8go2-tan.ln1@gandalf .grey-net.com...[color=blue]
        > How do I use State Server or SQL DB?
        >
        > Once a user is logged in, is there any other way of knowing who they are?
        > I have a roles (not rules...typo) based system where each role is assigned
        > various privileges. Certain pages require certain privileges and so do
        > certain controls.
        >
        > Thanks.
        >
        > Brock Allen wrote:
        >[color=green]
        >> The ASP.NET worker process recycles for various reasons and it happens
        >> more often that people would expect. You have to design/code for it,
        >> including the possibility of InProc session being lost. To save session,
        >> keep it out of the worker process via the State Server or the Sql DB, or
        >> just don't use Session state which is somtimes possible, depending upon
        >> what you're doing.
        >>
        >> -Brock
        >> DevelopMentor
        >> http://staff.develop.com/ballen
        >>
        >>
        >>[color=darkred]
        >>> This seems to be related to the ViewState error that is now starting
        >>> to plague ASP.Net apps. When the Application Pool is recycled, the
        >>> Session seems to be getting reset. When this is done, session
        >>> information is lost and my app forgets what rules a user has. I'd
        >>> rather not recode to read this from the database for every page, but I
        >>> wonder if I have no other choice. Anyone else notice the Session
        >>> resetting?
        >>>[/color]
        >>
        >>[/color][/color]

        Comment

        Working...