This documentation is archived and is not being maintained.
HostingEnvironment Class
Visual Studio 2010
Provides application-management functions and application services to a managed application within its application domain. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
The HostingEnvironment type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | HostingEnvironment | Infrastructure. Initializes a new instance of the HostingEnvironment class. |
| Name | Description | |
|---|---|---|
![]() ![]() | ApplicationHost | This property supports the ASP.NET infrastructure and is not intended to be used directly from your code. |
![]() ![]() | ApplicationID | Gets the unique identifier of the application. |
![]() ![]() | ApplicationPhysicalPath | Gets the physical path on disk to the application's directory. |
![]() ![]() | ApplicationVirtualPath | Gets the root virtual path of the application. |
![]() ![]() | Cache | Gets the Cache instance for the current application. |
![]() ![]() | InClientBuildManager | Gets a value that indicates whether the hosting environment has access to the ASP.NET build system. |
![]() ![]() | InitializationException | Gets any exception thrown during initialization of the HostingEnvironment object. |
![]() ![]() | IsHosted | Gets a value indicating whether the current application domain is being hosted by an ApplicationManager object. |
![]() ![]() | MaxConcurrentRequestsPerCPU | Gets or sets the maximum concurrent requests per CPU. |
![]() ![]() | MaxConcurrentThreadsPerCPU | Gets or sets the maximum concurrent threads per CPU. |
![]() ![]() | ShutdownReason | Returns an enumerated value that indicates why the application terminated. |
![]() ![]() | SiteName | Gets the name of the site. |
![]() ![]() | VirtualPathProvider | Gets the virtual path provider for this application. |
| Name | Description | |
|---|---|---|
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() ![]() | DecrementBusyCount | Reduces the count of busy objects in the hosted environment by one. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | Impersonate() | Impersonates the user represented by the application identity. |
![]() ![]() | Impersonate(IntPtr) | Impersonates the user represented by the specified user token. |
![]() ![]() | Impersonate(IntPtr, String) | Impersonates the user specified by the configuration settings for the specified virtual path, or the specified user token. |
![]() ![]() | IncrementBusyCount | Increases the count of busy objects in the hosted environment by one. |
![]() | InitializeLifetimeService | Infrastructure. Gives the HostingEnvironment object an infinite lifetime by preventing a lease from being created. (Overrides MarshalByRefObject::InitializeLifetimeService().) |
![]() ![]() | InitiateShutdown | Starts shutting down the Web application associated with this host and removes registered objects from the system. |
![]() ![]() | MapPath | Maps a virtual path to a physical path on the server. |
![]() | MemberwiseClone() | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
![]() ![]() | MessageReceived | This method supports the ASP.NET infrastructure and is not intended to be used directly from your code. |
![]() ![]() | RegisterObject | Places an object in the list of registered objects for the application. |
![]() ![]() | RegisterVirtualPathProvider | Registers a new VirtualPathProvider instance with the ASP.NET compilation system. |
![]() ![]() | SetCultures() | Sets the current thread to the culture specified in the application configuration file. |
![]() ![]() | SetCultures(String) | Sets the current thread to the culture of the specified virtual path. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() ![]() | UnregisterObject | Removes an object from the list of registered objects for the application. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:



