Application domains provide a flexible and secure method of isolating running applications.Application domains are usually created and manipulated by run-time hosts. Occasionally, you may want your application to programmatically interact with your application domains, for example, to unload a component without having to stop your application from running.Application domains aid security, separating applications from each other and each other's data. A single process can run several application domains, with the same level of isolation that would exist in separate processes. Running multiple applications within a single process increases server scalability.
In the following code example, you create a new application domain and then load and execute a previously built assembly, HelloWorld.exe, that is stored on drive C.
Application domains have the following properties:
An assembly must be loaded into an application domain before it can be executed.
Faults in one application domain cannot affect other code running in another application domain.
Individual applications can be stopped and code unloaded without stopping the entire process. You cannot unload individual assemblies or types, only entire application domains.
Describes how to programmatically create an application domain.
Describes how to programmatically unload an application domain.
Provides an introduction to configuring an application domain.
Describes how to retrieve setup information from an application domain.
Describes how to load an assembly into an application domain.
Describes how to retrieve information about an assembly.
Explains how you can receive a notification that an exception has been thrown, before the common language runtime has begun searching for exception handlers.
Provides guidance on using the AppDomain.AssemblyResolve event to resolve assembly load failures.