Understanding the Global.asax file
page 3 of 6
by Joydip Kanjilal
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 187077/ 578

Events in the Global.asax file

The following are some of the important events in the Global.asax file.

·         Application_Init

·         Application_Start

·         Session_Start

·         Application_BeginRequest

·         Application_EndRequest

·         Application_AuthenticateRequest

·         Application_Error

·         Session_End

·         Application_End

The purpose of these event handlers is discussed in this section below.


The Application_Init event is fired when an application initializes the first time.


The Application_Start event is fired the first time when an application starts.


The Session_Start event is fired the first time when a user’s session is started. This typically contains for session initialization logic code.


The Application_BeginRequest event is fired each time a new request comes in.


The Application_EndRequest event is fired when the application terminates.


The Application_AuthenticateRequest event indicates that a request is ready to be authenticated. If you are using Forms Authentication, this event can be used to check for the user's roles and rights.


The Application_Error event is fired when an unhandled error occurs within the application.


The Session_End Event is fired whenever a single user Session ends or times out.


The Application_End event is last event of its kind that is fired when the application ends or times out. It typically contains application cleanup logic.

View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2015 ASPAlliance.com  |  Page Processed at 10/9/2015 4:49:58 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search