IIS AppDomain, Application Pool and Worker Process

There are 3 things involved when hosting an application in IIS.

App Domain

In a server you can have many asp.net sites that runs together. Each one site is an app domain.

App Pool

You must assign to each of them one application pool. Many AppDomains (sites) can have the same application pool, and because they have the same application pool they run under the same processes, and under the same account – and they have the same settings of the pool. If this pool restarts, then all sites under that pools restarts.

Worker Process

Now each pool can have one or more worker process. Each worker process is a different program that run’s your site, have their alone static variables, they different start stop calls etc. Different worker process are not communicate together, and the only way to exchange data is from common files or a common database. If you have more than one worker process and one of them make long time calculations, then the other can take care to handle the internet calls and show content.