The Global.asax file is an optional file that is located in the application's root directory.The Global.asax file is parsed and dynamically compiled by ASP.NET into a .NET Framework class the first time any resource or URL within its application namespace is activated or requested. This file exposes event handlers with application-wide or session-wide scope in the Global.asax file such as Application_Start, Application_End, Session_Start, Session_End, etc.. Also exposes objects with application-wide or session-wide scope in it.
Events in Global.asax
1. Application_Init
2. Application_Start
3. Session_Start
4. Application_BeginRequest
5. Application_EndRequest
6. Application_AuthenticateRequest
7. Application_Error
8. Session_End
9. Application_End
There can be only one Global.asax file per application and it should be located in the application's root directory only.
No comments:
Post a Comment