What happens to ApplicationState if IIS decides to spawn another app domain for an ASP dot net appli

Discussion in 'ASP .Net' started by newjazzharmony@hotmail.com, May 15, 2006.

  1. Guest

    I have heard that IIS may decide to spawn one or more additional app
    domains for a single ASP dot net application.
    Is this true?
    Is there a difference in how this works in IIS 5 and IIS 6?
    Is it configurable?

    Finally, if a new app domain is spawned for a single application, does
    this equate to a totally different application (with its own
    Application state, and its own Application_Start/Application_End
    events, etc.)?

    Thanks,
    Jonathan
     
    , May 15, 2006
    #1
    1. Advertising

  2. IIS does not control appdomain, this is done by the asp.net isapi filter.
    asp.net run a file monitor looking for changes to files. if any changes are
    seen, on the next request, a new appdomain is spun up (to load the new code
    in), and all new requests go to it. the old app domain finishes the request
    its processing and exits (hopefully). spinning up the new appdomain fires
    Application start/etc and a new Application state.

    while its technically possible to copy the application state objects to the
    new domain, they would all have to be serializable (to marshal across domain
    boundries), which currently is not a requirement for application objects.

    what is guanenteeded is that the application start routine will be called
    before any request.

    -- bruce (sqlwork.com)




    <> wrote in message
    news:...
    >I have heard that IIS may decide to spawn one or more additional app
    > domains for a single ASP dot net application.
    > Is this true?
    > Is there a difference in how this works in IIS 5 and IIS 6?
    > Is it configurable?
    >
    > Finally, if a new app domain is spawned for a single application, does
    > this equate to a totally different application (with its own
    > Application state, and its own Application_Start/Application_End
    > events, etc.)?
    >
    > Thanks,
    > Jonathan
    >
     
    bruce barker \(sqlwork.com\), May 15, 2006
    #2
    1. Advertising

  3. Guest

    Thanks for the response.

    It sounds like you're saying that the dot net isapi filter only creates
    another app domain for an application if there is a change to the
    application code, and in that case it would ultimately destroy the
    initial app domain.

    Is that correct?
     
    , May 15, 2006
    #3
  4. Re: What happens to ApplicationState if IIS decides to spawn anoth

    Yes, that is almost exactly what Bruce wrote. In addition, AppPools can be
    recycled in IIS 6.0 because of excessive memory usage and other factors.
    Unhandled exceptions can also bring down an appDomain.
    In IIS 6.0 AppPool behavior is user-configurable. However normally there
    would not be more than one active appdomain for a single instance of an IIS
    ASP.NET application.
    --
    Co-founder, Eggheadcafe.com developer portal:
    http://www.eggheadcafe.com
    UnBlog:
    http://petesbloggerama.blogspot.com




    "" wrote:

    > Thanks for the response.
    >
    > It sounds like you're saying that the dot net isapi filter only creates
    > another app domain for an application if there is a change to the
    > application code, and in that case it would ultimately destroy the
    > initial app domain.
    >
    > Is that correct?
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, May 15, 2006
    #4
  5. Guest

    Re: What happens to ApplicationState if IIS decides to spawn anoth

    >Yes, that is almost exactly what Bruce wrote
    Thanks for the confirmation.
     
    , May 15, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jenny

    ApplicationState

    Jenny, Nov 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    329
    Jenny
    Nov 3, 2003
  2. Khurram Hanif

    Error while trying to debug asp.net appli...

    Khurram Hanif, Dec 16, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    368
    Curt_C [MVP]
    Dec 16, 2004
  3. Derek Basch
    Replies:
    2
    Views:
    1,331
    Donn Cave
    Jan 21, 2005
  4. Ed Hames
    Replies:
    0
    Views:
    399
    Ed Hames
    Apr 16, 2008
  5. Replies:
    6
    Views:
    297
    Thomas 'PointedEars' Lahn
    Dec 12, 2005
Loading...

Share This Page