Global.asax file is used to store session and application objects.only one Global.asax file exits for website. The Global.asax file, which is derived from the HttpApplication class, maintains a pool of HttpApplication objects, and assigns them to applications as needed. The Global.asax file contains the following events: 1--> Application_Init: Fired when an application initializes or is first called. It's invoked for all HttpApplication object instances. 2--> Application_Disposed: Fired just before an application is destroyed. This is the ideal location for cleaning up previously used resources. 3--> Application_Error: Fired when an unhandled exception is encountered within the application. 4--> Application_Start: Fired when the first instance of the HttpApplication class is created. It allows you to create objects that are accessible by all HttpApplication instances. 5--> Application_End: Fired when the last instance of an HttpApplication class is destroyed. It's fired only once during an application's lifetime. 6--> Application_BeginRequest: Fired when an application request is received. It's the first event fired for a request, which is often a page request (URL) that a user enters. 7-->Application_EndRequest: The last event fired for an application request. 8--> Application_PreRequestHandlerExecute: Fired before the ASP.NET page framework begins executing an event handler like a page or Web service. 9--> Application_PostRequestHandlerExecute: Fired when the ASP.NET page framework is finished executing an event handler. 10--->Applcation_PreSendRequestHeaders: Fired before the ASP.NET page framework sends HTTP headers to a requesting client (browser). 11--> Application_PreSendContent: Fired before the ASP.NET page framework sends content to a requesting client (browser). 12--> Application_AcquireRequestState: Fired when the ASP.NET page framework gets the current state (Session state) related to the current request. 13--> Application_ReleaseRequestState: Fired when the ASP.NET page framework completes execution of all event handlers. This results in all state modules to save their current state data. 14--> Application_ResolveRequestCache: Fired when the ASP.NET page framework completes an authorization request. It allows caching modules to serve the request from the cache, thus bypassing handler execution. 15-->Application_UpdateRequestCache: Fired when the ASP.NET page framework completes handler execution to allow caching modules to store responses to be used to handle subsequent requests. 16--> Application_AuthenticateRequest: Fired when the security module has established the current user's identity as valid. At this point, the user's credentials have been validated. 17--> Application_AuthorizeRequest: Fired when the security module has verified that a user can access resources. 18-->Session_Start: Fired when a new user visits the application Web site. 19--> Session_End: Fired when a user's session times out, ends, or they leave the application Web site. The order inwhich the events r executed are: They're triggered in the following order: Application_BeginRequest Application_AuthenticateRequest Application_AuthorizeRequest Application_ResolveRequestCache Application_AcquireRequestState Application_PreRequestHandlerExecute Application_PreSendRequestHeaders Application_PreSendRequestContent <> Application_PostRequestHandlerExecute Application_ReleaseRequestState Application_UpdateRequestCache Application_EndRequest.
|
No responses found. Be the first to respond and make money from revenue sharing program.
|