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

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

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


    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
    ------------------------------------------------------------------------

    anjinho Guest

  2. Similar Questions and Discussions

    1. Windows authentication breaks after configuring application pool identity
      Hi group I run IIS 6.0 on W2k3 being an Active Directory Controller in a test lab. Create a virtual directory 'test' with Windows authentication...
    2. Sharing Forms Authentication between application and sub-application
      Hi, I'm succesfully using Forms Authentication on a site I'm working on (MyMainApp). In a subfolder of this site, I have a seperate ASP.NET...
    3. Forms Authentication to protect a cgi application
      I have enabled forms authentication on an IIS 6 W2k3 server to protect access to the application files until authenticated. The actual...
    4. Forms Authentication to protect .cgi application problem
      I have enabled forms authentication on an IIS 6 W2k3 server to protect access to the application files until authenticated. The actual...
    5. Restrict access to resources like .doc, .ppt etc in .net forms authentication application
      Hi, We are developing a .NET app which has forms authentication. When the user types in the direct URL which is an aspx page, he will be thrown...
  3. #2

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

    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
     



    Dominick Guest

  4. #3

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

    Additionally, you should determine what's causing the Application pool
    recycles. A web app pool should not be recycling every 20 minutes (or less).

    Cheers
    Ken

    --
    Blog: www.adopenstatic.com/cs/blogs/ken/
    Web: www.adopenstatic.com



    "Dominick Baier [DevelopMentor]" <com>
    wrote in message news:microsoft.com...
    : 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
    : > ----------------------------------------------------------------------
    : > --
    :
    :
    :


    Ken Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139