System.Web.HttpContext.Server Property

Gets the System.Web.HttpServerUtility object that provides methods used in processing Web requests.


public HttpServerUtility Server { get; }


Documentation for this section has not yet been entered.


The HttpContext.Server property provides programmatic access to the properties and methods of the System.Web.HttpServerUtility class. Because ASP.NET pages contain a default reference to the System.Web namespace (which contains the System.Web.HttpContext class), you can reference the members of System.Web.HttpContext on an .aspx page without using the fully qualified class reference to System.Web.HttpContext. For example, you can use Server.CreateObject("MyCOMComponent") to create an instance of a COM object on the server. However, if you want to use the members of System.Web.HttpServerUtility from an ASP.NET code-behind module, you must include a reference to the System.Web namespace in the module and a fully qualified reference to both the currently active request/response context and the class in System.Web that you want to use. For example, in a code-behind page you must specify the fully qualified name HttpContext.Current.Server.CreateObject("MyCOMComponent").


Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0,