Using Application Domains

Application domains provide a unit of isolation for the common language runtime. They are created and run inside a process. Application domains are usually created by a runtime host, which is an application responsible for loading the runtime into a process and executing user code within an application domain. The runtime host creates a process and a default application domain, and runs managed code inside it. Runtime hosts include ASP.NET and the Windows shell.

For most applications, you do not need to create your own application domain; the runtime host creates any necessary application domains for you. However, you can create and configure additional application domains if your application needs to isolate code or to use and unload DLLs.

In This Section

How to: Create an Application Domain
Describes how to programmatically create an application domain.

How to: Unload an Application Domain
Describes how to programmatically unload an application domain.

How to: Configure an Application Domain
Provides an introduction to configuring an application domain.

Retrieving Setup Information from an Application Domain
Describes how to retrieve setup information from an application domain.

How to: Load Assemblies into an Application Domain
Describes how to load an assembly into an application domain.

How to: Obtain Type and Member Information from an Assembly
Describes how to retrieve information about an assembly.

Shadow Copying Assemblies
Describes how shadow copying allows updates to assemblies while they are in use, and how to configure shadow copying.

How to: Receive First-Chance Exception Notifications
Explains how you can receive a notification that an exception has been thrown, before the common language runtime has begun searching for exception handlers.

Resolving Assembly Loads
Provides guidance on using the AppDomain.AssemblyResolve event to resolve assembly load failures.


Represents an application domain. Provides methods for creating and controlling application domains.

Assemblies in .NET
Provides an overview of the functions performed by assemblies.

Programming with Assemblies
Describes how to create, sign, and set attributes on assemblies.

Emitting Dynamic Methods and Assemblies
Describes how to create dynamic assemblies.

Application Domains
Provides a conceptual overview of application domains.

Reflection Overview
Describes how to use the Reflection class to obtain information about an assembly.