#706 – An Application Domain Enables Application Isolation
November 2, 2012 1 Comment
An application domain is an environment in which an application executes and which provides for isolation between applications. Code running in an application domain is isolated from other application domains in that it contains its own data and cannot affect code running in other application domains.
You most often run every managed (CLR) application in its own Windows process, with the process containing a single application domain. But it’s also possible for a process to host multiple application domains. In this case, the applications are still isolated. If the code within one of the application domains crashes, it does not impact code in the other application domain(s).
You can think of an app domain as the Common Language Runtime’s application isolation mechanism, whereas the process is the application isolation mechanism for Windows itself.
I’ve got an ASP.NET application running on IIS 7 with multiple application domains, and I can’t fathom why there are multiple app domains in a single process. I’ve grepped my code base, and I’m not explicitly creating a second application domain. Is it possible that a recycle has failed to time out?