Export (0) Print
Expand All

HttpRuntime Class

Provides a set of ASP.NET run-time services for the current application.

System.Object
  System.Web.HttpRuntime

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

[<Sealed>]
type HttpRuntime =  class end

The HttpRuntime type exposes the following members.

  NameDescription
Public methodHttpRuntimeInitializes a new instance of the HttpRuntime class.
Top

  NameDescription
Public propertyStatic memberAppDomainAppIdGets the application identification of the application domain where the HttpRuntime exists.
Public propertyStatic memberAppDomainAppPathGets the physical drive path of the application directory for the application hosted in the current application domain.
Public propertyStatic memberAppDomainAppVirtualPathGets the virtual path of the directory that contains the application hosted in the current application domain.
Public propertyStatic memberAppDomainIdGets the domain identification of the application domain where the HttpRuntime instance exists.
Public propertyStatic memberAspClientScriptPhysicalPathGets the folder path for the ASP.NET client script files.
Public propertyStatic memberAspClientScriptVirtualPathGets the virtual path for the ASP.NET client script files.
Public propertyStatic memberAspInstallDirectoryGets the physical path of the directory where the ASP.NET executable files are installed.
Public propertyStatic memberBinDirectoryGets the physical path to the /bin directory for the current application.
Public propertyStatic memberCacheGets the Cache for the current application.
Public propertyStatic memberClrInstallDirectoryGets the physical path to the directory where the common language runtime executable files are installed.
Public propertyStatic memberCodegenDirGets the physical path to the directory where ASP.NET stores temporary files (generated sources, compiled assemblies, and so on) for the current application.
Public propertyStatic memberIISVersionGets the version of IIS that is hosting this application.
Public propertyStatic memberIsOnUNCShareGets a value that indicates whether the application is mapped to a universal naming convention (UNC) share.
Public propertyStatic memberMachineConfigurationDirectoryGets the physical path to the directory where the Machine.config file for the current application is located.
Public propertyStatic memberTargetFrameworkGets the version of the .NET Framework that the current web application targets.
Public propertyStatic memberUsingIntegratedPipelineGets a value that indicates whether the current application is running in the integrated-pipeline mode of IIS 7.0.
Top

  NameDescription
Public methodStatic memberCloseShuts down the HttpRuntime instance.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodStatic memberGetNamedPermissionSetInfrastructure. Returns the set of permissions associated with code groups.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberProcessRequestDrives all ASP.NET Web processing execution.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodStatic memberUnloadAppDomainTerminates the current application. The application restarts the next time a request is received for it.
Top

The HttpRuntime object is used at the beginning of the ASP.NET pipeline model that processes HTTP requests. The ProcessRequest method drives all subsequent ASP.NET Web processing.

Page developers can use the HttpRuntime class properties to find out information about the current application domain for diagnostic purposes, for example. Developers creating custom process pipeline or a custom hosting environment should call the ProcessRequest method from a class derived from the HttpWorkerRequest or SimpleWorkerRequest class.

The following example demonstrates how to get properties of the HttpRuntime class representing the current application domain and display them to the browser.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft