karthik
karthik

Reputation: 459

ASP.net Application domain

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

Upvotes: 0

Views: 1086

Answers (4)

Ashish Jain
Ashish Jain

Reputation: 4797

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.

Upvotes: 0

spoulson
spoulson

Reputation: 21591

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.

Upvotes: 0

Wim
Wim

Reputation: 12082

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.

Upvotes: 1

user151323
user151323

Reputation:

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.

Upvotes: 1

Related Questions