Webgardens, ASP + IIS 6.0RSS

13 replies

Last post May 11, 2009 08:15 AM by matelot666

  • Webgardens, ASP + IIS 6.0

    May 01, 2009 09:22 AM|matelot666|LINK

    I have an ASP application that uses 1 session variable, this session variable is re-read when lost (app pool recycle) from a client based cookie. The application also uses intergrated windows authentication.

     We therefore hoped we'd be able to use web gardens, however, when sessions were randomly lost a user was re-prompted for login and password, presumably when their requests hit a new worker proccess.

     Is there anyway around this? for various reasons the ability to utilise web gardens to scale our application is important.

    web gardens asp iis 6.0

  • Re: Webgardens, ASP + IIS 6.0

    May 01, 2009 09:47 AM|Paul Lynch|LINK

    Hi,

    If you want to use web gardens in your application then you will need to store your session information outside the application process, such as in a SQL database or in the Asp.Net state server service.

    What you are seeing is the users' session state being 'lost' because their requests are routed to the next available worker process in the web garden, which is not necessarily the one which they were routed to on their previous request.

    Regards,

    Paul Lynch
    MCSE
  • Re: Webgardens, ASP + IIS 6.0

    May 01, 2009 09:57 AM|tomkmvp|LINK

    Webgarden technology is frequently misunderstood.  Are you sure you want to use that? Why do you believe your application can benefit from it?

    Tom Kaminski (former IIS MVP 2002-2010)
    http://mvp.support.microsoft.com/
  • Re: Webgardens, ASP + IIS 6.0

    May 01, 2009 11:09 AM|matelot666|LINK

     We'll need to do this even tho our code will restablish our session details from our cookie?

    Could you possibly explain why? Is it loss off the asp session state or is the session state cookie invalid when it hits the new web garden?

     As our app doesnt care about its session vars and will create those needed from the cookie I'm not sure how destruction of that session is causing this problem.

     

     

    Paul Lynch

    Hi,

    If you want to use web gardens in your application then you will need to store your session information outside the application process, such as in a SQL database or in the Asp.Net state server service.

    What you are seeing is the users' session state being 'lost' because their requests are routed to the next available worker process in the web garden, which is not necessarily the one which they were routed to on their previous request.

    Regards,


  • Re: Webgardens, ASP + IIS 6.0

    May 01, 2009 11:13 AM|matelot666|LINK

    tomkmvp

    Webgarden technology is frequently misunderstood.  Are you sure you want to use that? Why do you believe your application can benefit from it?

     

     

    Basically our application has memory leaks, more than one and the application is far from small. It will easily hit 3GB memory limit in 3-4 hours. The application pool will often hang on recycle so that isnt an option. Multiple webgardens will allow us to scale this until those leaks are fixed.

     

     

  • Re: Webgardens, ASP + IIS 6.0

    May 05, 2009 06:31 AM|matelot666|LINK

     any ideas?

  • Rovastar Rovastar

    5457 Posts

    MVP

    Moderator

    Re: Webgardens, ASP + IIS 6.0

    May 08, 2009 07:16 AM|Rovastar|LINK

    If your app doesn't even recycle I am comfused how you think webgardens are going to help.

    You will just get 1 out of control wp memory hog and then many more in the webgardens wp's.

    Anyway to answer your question ASP session data is kept in the worker process (which by default is InProc) hence way you are losing it.

    See this kb article:

    http://support.microsoft.com/?id=822171

    Web gardens are not a quick fix they don't cope well for production enviornments and personally I wish they were never included as they cause more issue and confusion than solving anything.

    Test your code properly and if the application is large break it down into smaller applications so you can manage them better. A cleaner architecture makes life so much more simple.

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: Webgardens, ASP + IIS 6.0

    May 11, 2009 05:04 AM|matelot666|LINK

     Actually what we see is reasonably even memory usage across all 4 web gardens.

     

    As our application doesnt care about session loss, even if we do a recycle nothing user end is lost what we're trying to understand is why when web gardens are switched in do users randomly get re-prompted for their login (integrated auth is switched on).

    If this is due to session loss then why doesnt the same thing occurr (login prompt) when the application pool is recycled or even when an IISRESET is run?

     Is there a way to reproduce this programatically?

     

     

  • Rovastar Rovastar

    5457 Posts

    MVP

    Moderator

    Re: Webgardens, ASP + IIS 6.0

    May 11, 2009 05:20 AM|Rovastar|LINK

    Does changing the session state fix the problem?

    It has been explained numerous times that this should fix the problem.

    Did you even try it?

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: Webgardens, ASP + IIS 6.0

    May 11, 2009 05:28 AM|matelot666|LINK

    Unfortunately, not being a developer on the project I'm unable to do this and development dont believe this is needed.

     

    Basically what i'm after is a technical explanation of why the user is reprompted for login details randomly when webgardens are enabled and yet when clear sessions via app pool recycle/iisreset it doesnt reprompt for a login.

     

     

  • Rovastar Rovastar

    5457 Posts

    MVP

    Moderator

    Re: Webgardens, ASP + IIS 6.0

    May 11, 2009 07:22 AM|Rovastar|LINK

    If you have webgardens and the inproc you can get problems with session information being lost. The links explain more.

    AFAIC web admin/architects should have the fine say over the session management state. Devs are not admin. Tell them it needs changing.

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: Webgardens, ASP + IIS 6.0

    May 11, 2009 07:28 AM|matelot666|LINK

     Trust me, I've tried. The link explains that sessions will be lost, but as I say, the devs response to that is the app withstands an iisreset or an application pool recycle without reprompting for ntlm login so how is webgardens causing the problem.

     

    There seems to be very little information on the web, including the iis 6 architecture documentation as to what http.sys does with the security context and why the security is being confused by web gardens.

  • Rovastar Rovastar

    5457 Posts

    MVP

    Moderator

    Re: Webgardens, ASP + IIS 6.0

    May 11, 2009 08:08 AM|Rovastar|LINK

    There is probably little documentation as web gardens are rarely used.

    Try it and see. it is a tiny change for the devs/ you to do. Just select state server.

     

     

    Troubleshoot IIS in style
    https://www.leansentry.com/
  • Re: Webgardens, ASP + IIS 6.0

    May 11, 2009 08:15 AM|matelot666|LINK

     how will this work, classic asp cannot store state info in the state db/service??