Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ApplicationHost.CreateApplicationHost Method

Creates and configures an application domain for hosting ASP.NET.

Namespace:  System.Web.Hosting
Assembly:  System.Web (in System.Web.dll)

[SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true)]
public static Object CreateApplicationHost(
	Type hostType,
	string virtualDir,
	string physicalDir


Type: System.Type

The name of a user-supplied class to be created in the new application domain.

Type: System.String

The virtual directory for the application domain; for example, /myapp.

Type: System.String

The physical directory for the application domain where ASP.NET pages are located; for example, c:\mypages.

Return Value

Type: System.Object
An instance of a user-supplied class used to marshal calls into the newly created application domain.


The Web host computer is not running the Windows NT platform or a Coriolis environment.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
© 2015 Microsoft