HostingEnvironment Members

HostingEnvironment Members

Provides application-management functions and application services to a managed application within its application domain. This class cannot be inherited.

The following tables list the members exposed by the HostingEnvironment type.

  Name Description
Public method HostingEnvironment Initializes a new instance of the HostingEnvironment class.

  Name Description
Public property Static ApplicationHost This property supports the ASP.NET infrastructure and is not intended to be used directly from your code.
Public property Static ApplicationID Gets the unique identifier of the application.
Public property Static ApplicationPhysicalPath Gets the physical path on disk to the application's directory.
Public property Static ApplicationVirtualPath Gets the root virtual path of the application.
Public property Static Cache Gets the Cache instance for the current application.
Public property Static InitializationException Gets any exception thrown during initialization of the HostingEnvironment object.
Public property Static IsHosted Gets a value indicating whether the current application domain is being hosted by an ApplicationManager object.
Public property Static ShutdownReason Returns an enumerated value that indicates why the application terminated.
Public property Static SiteName Gets the name of the site.
Public property Static VirtualPathProvider Gets the virtual path provider for this application.

(see also Protected Methods )
  Name Description
Public method 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)
Public method Static DecrementBusyCount Reduces the count of busy objects in the hosted environment by one.
Public method Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetLifetimeService  Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method GetType  Gets the Type of the current instance. (inherited from Object)
Public method Static Impersonate Overloaded. Allows code to impersonate a different user.
Public method Static IncrementBusyCount Increases the count of busy objects in the hosted environment by one.
Public method InitializeLifetimeService Overridden. Gives the HostingEnvironment object an infinite lifetime by preventing a lease from being created.
Public method Static InitiateShutdown Starts shutting down the Web application associated with this host and removes registered objects from the system.
Public method Static MapPath Maps a virtual path to a physical path on the server.
Public method Static MessageReceived  
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method Static RegisterObject Places an object in the list of registered objects for the application.
Public method Static RegisterVirtualPathProvider Registers a new VirtualPathProvider instance with the ASP.NET compilation system.
Public method Static SetCultures Overloaded. Sets culture information for the current thread.
Public method ToString  Returns a String that represents the current Object. (inherited from Object)
Public method Static UnregisterObject Removes an object from the list of registered objects for the application.

  Name Description
Protected method Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Protected method MemberwiseClone  Overloaded. (inherited from MarshalByRefObject)

Community Additions

© 2016 Microsoft