What is AppDomain used by classic ASP when instantiating a .NET class?

What happens (from the CLR point of view) when the code on the classic ASP page creates an instance of the .NET class (marked as ComVisible, the type library is registered)?

What AppDomain is used for the newly created instance? Does this have anything to do with the AppDomain of an ASP.NET application running on the same site?

+5
source share
2 answers

Each "application" (asp.net or classic ASP site) in IIS runs in a win32 process, also known as an "application pool." Each application pool (process) can have zero or one version of the loaded CLR * (1.0,1.1,2.0,4.0) loaded into the process at the same time. Each CLR instance within a process has at least one application domain, runtime, and isolation block for .NET. When you instantiate a .NET component using CCW (COM-invoked shell) from a classic ASP, the CLR is loaded into the application pool process that hosts this site, and a default domain application is created for this process. The logical position in the hierarchy of the URL path does not matter, because different segments can have different application pools.

, , IIS/WAS CLR/appdomain/assembly.

* CLR 4.0 CLR

+2

AppDomain.CurrentDomain

http://msdn.microsoft.com/en-us/library/system.appdomain.currentdomain.aspx

FriendlyName Id, .

EDIT:

, appDomain ASP . ASP IIS, IIS6 , IIS ( ASP) appPool. asp/IIS appPool, . , . appDomains. asp .net COM, CLR . CLR appDomain "DefaultDomain". .

+1

All Articles