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

N

newjazzharmony

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
 
B

bruce barker \(sqlwork.com\)

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

newjazzharmony

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

Guest

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top