ApplicationHost.CreateApplicationHost Method (Type, String, String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
)

Parameters

hostType
Type: System.Type

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

virtualDir
Type: System.String

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

physicalDir
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.

Exception Condition
PlatformNotSupportedException

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

.NET Framework
Available since 1.1
Return to top
Show: