Difference between Application Pool and Application Domain RRS feed

  • Question


    What is the exact difference between AppDomain and AppPool?

    Thursday, May 13, 2010 6:02 AM


  • This question normally arises when configuring web applications.

    To summarize, an AppPool consists of one or more processes.  Each web application that you are running consists of (usually, IIRC) one application domain.  The issue is when you assign multiple web applications to the same AppPool, while they are separated by the application domain boundary they are still in the same process.  This can be less reliable/secure than using a separate AppPool for each web application.  On the other hand, it can improve performance by reducing the overhead of multiple processes.

    ASP.NET has its own forums.  I'd recommend you ask there if you have additional questions about how to set up ASP.NET: http://forums.asp.net/

    Here are some quotes from the documentation:


    Application Pool


    An Internet Information Services (IIS) application pool is a grouping of URLs that is routed to one or more worker processes. Because application pools define a set of Web applications that share one or more worker processes, they provide a convenient way to administer a set of Web sites and applications and their corresponding worker processes. Process boundaries separate each worker process; therefore, a Web site or application in one application pool will not be affected by application problems in other application pools. Application pools significantly increase both the reliability and manageability of a Web infrastructure.



    Application Domain


    A boundary that the common language runtime establishes around objects created within the same application scope (that is, anywhere along the sequence of object activations beginning with the application entry point). Application domains help isolate objects created in one application from those created in other applications so that run-time behavior is predictable. Multiple application domains can exist in a single process.


    • Marked as answer by SamAgain Friday, May 14, 2010 2:10 AM
    Thursday, May 13, 2010 11:07 PM