asp.net.ph

HttpApplication Class

System.Web Namespace


Defines the methods, properties, and events common to all application objects within an ASP.NET application. This class is the base class for applications defined by the user in the global.asax file.

HttpApplication Class Members

Collapse   Constructors

Visibility Constructor Parameters
public HttpApplication ( )

Collapse   Properties

Visibility Name Value Type Accessibility
public Application HttpApplicationState [ Get ]
public Context HttpContext [ Get ]
public Modules HttpModuleCollection [ Get ]
public Request HttpRequest [ Get ]
public Response HttpResponse [ Get ]
public Server HttpServerUtility [ Get ]
public Session HttpSessionState [ Get ]
public Site ISite [ Get , Set ]
public User IPrincipal [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
public AddOnAcquireRequestStateAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnAcquireRequestStateAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnAuthenticateRequestAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnAuthenticateRequestAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnAuthorizeRequestAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnAuthorizeRequestAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnBeginRequestAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnBeginRequestAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnEndRequestAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnEndRequestAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnLogRequestAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnLogRequestAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnMapRequestHandlerAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnMapRequestHandlerAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnPostAcquireRequestStateAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnPostAcquireRequestStateAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnPostAuthenticateRequestAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnPostAuthenticateRequestAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnPostAuthorizeRequestAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnPostAuthorizeRequestAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnPostLogRequestAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnPostLogRequestAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnPostMapRequestHandlerAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnPostMapRequestHandlerAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnPostReleaseRequestStateAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnPostReleaseRequestStateAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnPostRequestHandlerExecuteAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnPostRequestHandlerExecuteAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnPostResolveRequestCacheAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnPostResolveRequestCacheAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnPostUpdateRequestCacheAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnPostUpdateRequestCacheAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnPreRequestHandlerExecuteAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnPreRequestHandlerExecuteAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnReleaseRequestStateAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnReleaseRequestStateAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnResolveRequestCacheAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnResolveRequestCacheAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public AddOnUpdateRequestCacheAsync ( BeginEventHandler beginHandler , EndEventHandler endHandler , Object state ) Void
public AddOnUpdateRequestCacheAsync ( BeginEventHandler bh , EndEventHandler eh ) Void
public CompleteRequest ( ) Void
public Dispose ( ) Void
public GetOutputCacheProviderName ( HttpContext context ) String
public GetVaryByCustomString ( HttpContext context , String custom ) String
public Init ( ) Void
public OnExecuteRequestStep ( Action`2 callback ) Void
public static RegisterModule ( Type moduleType ) Void

Remarks

Instances of this class are created in the ASP.NET infrastructure, not by the user directly. One instance is used to process many requests in its lifetime but it can process only one at a time. Thus member variables can be used to store per-request data.

An application executes events that are handled by modules or user code defined in the global.asax file in the following sequence:

  1. BeginRequest
  2. AuthenticateRequest
  3. AuthorizeRequest
  4. ResolveRequestCache
    • A handler ( a page corresponding to the request URL is created at this point. ]
  5. AcquireRequestState
  6. PreRequestHandlerExecute
    • The handler is executed.
  7. PostRequestHandlerExecute
  8. ReleaseRequestState
    • Response filters, if any, filter the output.
  9. UpdateRequestCache
  10. EndRequest

Syntax


To set a property or call a method:

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

To return the value of a property or method:

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

See Also

HttpApplicationState Class 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