tags:

views:

58

answers:

4

Hi

I can understand Appdomain concept, but small doubt is

One Process -> many application domain,

ok now,

when a application domain is created ? while making request or at time of hosting in IIS.

Again created Appdomain is One to one relationship with asp.net web Application..?

Could you please clear this, I want to know when appdomain created by CLR?

Thanks karthikeyan

+1  A: 

when a application domain is created ?

I suppose when starting up IIS after you have set up virtual directories and uploaded your project files. Or maybe during the first incoming request.

Another thing to remember is that an application domain can be destroyed and recreated during operation. If your application has consumed too much server resources (memory), the application domain can be recycled and then recreated again.

Developer Art
+1  A: 

I'd say an AppDomain is created per ASP.NET web application, and is launched when the first request comes in and there is no AppDomain already instantiated for the current path.

Obviously there are IIS configurable idle times for when AppDomains in an AppPool (many to one) are being shut down.

Wim Hollebrandse
A: 

When IIS6 starts up, it starts the App Pools. Each App Pool is a w3wp.exe process. Each process then creates its AppDomains for each associated ASP.NET application and triggers the Application start events on each.

spoulson
A: 

One AppPool is a w3wp process and in this it makes AppDomain for each application on various scenarios like the Application's resources are more consumed (restart of appdomain) or the files like web.config etc are altered or a version of DLL is added.

Beginner