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- Application_Init
- Application_Start
- Session_Start
- Application_BeginRequest
- Application_EndRequest
- Application_AuthenticateRequest
- Application_Error
- Session_End
- 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