asp.net.ph

HttpContext Class

System.Web Namespace


Encapsulates all HTTP-specific information about an individual HTTP request.

HttpContext Class Members

Collapse   Constructors

Visibility Constructor Parameters
public HttpContext ( HttpRequest request , HttpResponse response )
public HttpContext ( HttpWorkerRequest wr )

Collapse   Properties

Visibility Name Value Type Accessibility
public AllErrors Exception [ Get ]
public AllowAsyncDuringSyncStages Boolean [ Get , Set ]
public Application HttpApplicationState [ Get ]
public ApplicationInstance HttpApplication [ Get , Set ]
public AsyncPreloadMode AsyncPreloadModeFlags [ Get , Set ]
public Cache Cache [ Get ]
public static Current HttpContext [ Get , Set ]
public CurrentHandler IHttpHandler [ Get ]
public CurrentNotification RequestNotification [ Get ]
public Error Exception [ Get ]
public Handler IHttpHandler [ Get , Set ]
public IsCustomErrorEnabled Boolean [ Get ]
public IsDebuggingEnabled Boolean [ Get ]
public IsPostNotification Boolean [ Get ]
public IsWebSocketRequest Boolean [ Get ]
public IsWebSocketRequestUpgrading Boolean [ Get ]
public Items IDictionary [ Get ]
public PageInstrumentation PageInstrumentationService [ Get ]
public PreviousHandler IHttpHandler [ Get ]
public Profile ProfileBase [ Get ]
public Request HttpRequest [ Get ]
public Response HttpResponse [ Get ]
public Server HttpServerUtility [ Get ]
public Session HttpSessionState [ Get ]
public SkipAuthorization Boolean [ Get , Set ]
public ThreadAbortOnTimeout Boolean [ Get , Set ]
public Timestamp DateTime [ Get ]
public Trace TraceContext [ Get ]
public User IPrincipal [ Get , Set ]
public WebSocketNegotiatedProtocol String [ Get ]
public WebSocketRequestedProtocols IList`1 [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
public AcceptWebSocketRequest ( Func`2 userFunc , AspNetWebSocketOptions options ) Void
public AcceptWebSocketRequest ( Func`2 userFunc ) Void
public AddError ( Exception errorInfo ) Void
public AddOnRequestCompleted ( Action`1 callback ) ISubscriptionToken
public ClearError ( ) Void
public DisposeOnPipelineCompleted ( IDisposable target ) ISubscriptionToken
public static GetAppConfig ( String name ) Object
public GetConfig ( String name ) Object
public static GetGlobalResourceObject ( String classKey , String resourceKey , CultureInfo culture ) Object
public static GetGlobalResourceObject ( String classKey , String resourceKey ) Object
public static GetLocalResourceObject ( String virtualPath , String resourceKey ) Object
public static GetLocalResourceObject ( String virtualPath , String resourceKey , CultureInfo culture ) Object
public GetSection ( String sectionName ) Object
public RemapHandler ( IHttpHandler handler ) Void
public RewritePath ( String filePath , String pathInfo , String queryString , Boolean setClientFilePath ) Void
public RewritePath ( String path ) Void
public RewritePath ( String path , Boolean rebaseClientPath ) Void
public RewritePath ( String filePath , String pathInfo , String queryString ) Void
public SetSessionStateBehavior ( SessionStateBehavior sessionStateBehavior ) Void

Remarks

Classes that inherit the IHttpModule and IHttpHandler interfaces are provided a reference to an HttpContext object for the current HTTP request. The object provides access to the intrinsic Request, Response, and Server objects for the request.

Syntax


To set a property or call a method:

Request.Context.propertyName = value;
Request.Context.methodName ( arguments );
  C# VB

To return the value of a property or method:

Type var = Request.Context.propertyName;
Type var = Request.Context.collectionName  [ key ];
Type var = Request.Context.methodName ( arguments );
  C# VB

Skip Navigation Links



Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph