Re: URGENT: please help ASP.NET Forms authentication and recycling of application pool

From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 05/21/05

  • Next message: Dominick Baier [DevelopMentor]: "Re: roleProvider and Windows Authentication"
    Date: Sat, 21 May 2005 00:23:03 -0700
    
    

    Hello anjinho,

    Context.User is rehydrated on every request and does not rely on something
    store InProc.

    A quick way of mitigating the recycling problem is to use the StateServer
    - change web.config to StateServer and enabled the local ASP.NET StateServer
    service in computer manager.

    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > Hello
    >
    > Now and then while using a webapp written in asp.net I lose my
    > variables stored in sessions variables.
    > I lose them before the time out of 20minutes is over. Sometimes just
    > after a few minutes.
    > I think this is because of the application pool that gets recycled.
    >
    > The webconfig is configured to inproc <sessionState mode="InProc" ....
    >
    > Now my question is:
    > When I rewrite my application and start using forms authentication
    > will
    > I lose my logged in userid that is stored within
    > HttpContext.Current.User.Identity.name?
    > Or is it always sent (within a cookie) to the website and when the
    > application is recycled it is rebuild so I never lose it within the
    > specified time out?
    >
    > I just want a solution so I don't lose my userid.
    >
    > And I can't use basic authentication or windows authentication because
    > the site is hosted for me and it doesn't have an ADS.
    >
    > Thanks in advance
    >
    > Andrew
    >
    > --
    > anjinho
    > ----------------------------------------------------------------------
    > --
    > Posted via http://www.codecomments.com
    > ----------------------------------------------------------------------
    > --


  • Next message: Dominick Baier [DevelopMentor]: "Re: roleProvider and Windows Authentication"

    Relevant Pages

    • Re: URGENT: please help ASP.NET Forms authentication and recycling of application pool
      ... as i said - formsauth does not rely on session but on cookies - so yes that ... but this doesn't solve the recycling prob - causes for recycling could be: ... > on cookies? ... >> StateServer ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Random 401.2 Errors, please help !!!
      ... > The user was probably unfortunate to be making an Integrated Authentication ... > request WHILE the worker process is recycling due to some scheduled reason. ...
      (microsoft.public.inetserver.misc)
    • Re: Random 401.2 Errors, please help !!!
      ... The user was probably unfortunate to be making an Integrated Authentication ... request WHILE the worker process is recycling due to some scheduled reason. ...
      (microsoft.public.inetserver.misc)
    • Re: Authentication problems on IIS6
      ... Furthermore, realize that when a worker process recycles, its internal state ... The problem with recycling is also that you lose internal state -- including ... Authentication status, etc. ...
      (microsoft.public.inetserver.iis)
    • Re: Forms authentication error 4005
      ... How do you change the resources available to a asp.net? ... | be using the wrong key to decrypt the authentication ticket. ... | sessions and or messing up the ticket if it's recycling too often. ...
      (microsoft.public.dotnet.framework.aspnet)

  • Quantcast