HostingEnvironment.HostingEnvironment Constructor

This constructor supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Initializes a new instance of the HostingEnvironment class.

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

public HostingEnvironment ()
public HostingEnvironment ()
public function HostingEnvironment ()
Not applicable.

Exception typeCondition


The HostingEnvironment constructor is called more than once.

The HostingEnvironment constructor initializes the HostingEnvironment object. The HostingEnvironment constructor is called only once by the application's ApplicationManager object. Calling the HostingEnvironment constructor more than once will cause an InvalidOperationException exception to be thrown.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions