| HttpApplication | disposable |
| System.Web (system.web.dll) | class |
HttpApplication is the default base class from
which your web application derives. This class is most notable for
the application-level events it provides. You can code event handlers
that react to global application events in the
global.asax file. If you use Visual Studio .NET
to create a code-behind class (like
global.asax.vb), the event handler code will be
created in a class called Global, which inherits
from HttpApplication.The first time a user navigates to a page in your application, the
ASP.NET engine creates a pool of HttpApplication
objects. Whenever your application receives a request, the ASP.NET
engine automatically assigns one of these
HttpApplication instances to serve the request.
This HttpApplication instance will be reused, but
only once the request is complete.public class HttpApplication : IHttpAsyncHandler, IHttpHandler, System.ComponentModel.IComponent, IDisposable {
// Public Constructors
public HttpApplication ( );
// Public Instance Properties
public HttpApplicationState Application {get; }
public HttpContext Context {get; }
public HttpModuleCollection Modules {get; }
public HttpRequest Request {get; }
public HttpResponse Response {get; }
public HttpServerUtility Server {get; }
public HttpSessionState Session {get; }
public ISite Site {set; get; } // implements System.ComponentModel.IComponent
public IPrincipal User {get; }
// Protected Instance Properties
protected EventHandlerList Events {get; }
// Public Instance Methods
public void AddOnAcquireRequestStateAsync (BeginEventHandler bh , EndEventHandler eh );
public void AddOnAuthenticateRequestAsync (BeginEventHandler bh , EndEventHandler eh );
public void AddOnAuthorizeRequestAsync (BeginEventHandler bh , EndEventHandler eh );
public void AddOnBeginRequestAsync (BeginEventHandler bh , EndEventHandler eh );
public void AddOnEndRequestAsync (BeginEventHandler bh , EndEventHandler eh );
public void AddOnPostRequestHandlerExecuteAsync (BeginEventHandler bh , EndEventHandler eh );
public void AddOnPreRequestHandlerExecuteAsync (BeginEventHandler bh , EndEventHandler eh );
public void AddOnReleaseRequestStateAsync (BeginEventHandler bh , EndEventHandler eh );
public void AddOnResolveRequestCacheAsync (BeginEventHandler bh , EndEventHandler eh );
public void AddOnUpdateRequestCacheAsync (BeginEventHandler bh , EndEventHandler eh );
public void CompleteRequest ( );
public virtual void Dispose ( ); // implements IDisposable
public virtual string GetVaryByCustomString (HttpContext context , string custom );
public virtual void Init ( );
// Events
public event EventHandler AcquireRequestState ;
public event EventHandler AuthenticateRequest ;
public event EventHandler AuthorizeRequest ;
public event EventHandler BeginRequest ;
public event EventHandler Disposed ; // implements System.ComponentModel.IComponent
public event EventHandler EndRequest ;
public event EventHandler Error ;
public event EventHandler PostRequestHandlerExecute ;
public event EventHandler PreRequestHandlerExecute ;
public event EventHandler PreSendRequestContent ;
public event EventHandler PreSendRequestHeaders ;
public event EventHandler ReleaseRequestState ;
public event EventHandler ResolveRequestCache ;
public event EventHandler UpdateRequestCache ;
}
Returned By
HttpContext.ApplicationInstancePassed To
HttpContext.ApplicationInstance,
IHttpModule.Init( ),
System.Web.Security.DefaultAuthenticationModule.Init(
),
System.Web.Security.FileAuthorizationModule.Init(
),
System.Web.Security.FormsAuthenticationModule.Init(
),
System.Web.Security.PassportAuthenticationModule.Init(
),
System.Web.Security.UrlAuthorizationModule.Init(
),
System.Web.Security.WindowsAuthenticationModule.Init(
),
System.Web.SessionState.SessionStateModule.Init( )