Sunday, February 6, 2011

global.asax

What is the Global.asax file?
Adding a global.asax file to your application allows your application to respond to application & session level events

Application level events
There are a number of application level events available in the global.asax file.

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

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.
Application_End

Session level events
There are two session level events available in the global.asax file.

The Session_Start event is fired whenever a new session of the application starts.
Session_Start

The Session_End event is fired whenever a session with the application ends.
Session_End


Further reading:
MSDN: Global.asax file http://msdn.microsoft.com/en-us/library/1xaas8a2%28VS.71%29.aspx
Understanding the Global.asax file http://aspalliance.com/1114
StackOverflow: What are the Pros and Cons of using Global.asax? http://stackoverflow.com/questions/135661/what-are-the-pros-and-cons-of-using-global-asax

No comments:

Post a Comment