GLOBAL.ASAX

The global.asax file is located at the root of your application’s directory tree. It handles high-level application events such as Application_Start, Application_End, Session_Start, and Session_End. This file is parsed and compiled into a dynamic .NET framework class the first time any resource or URL in your application’s namespace is used. The global.asax file is configured so that it rejects direct requests by URLs. This prevents users from gaining access to the code in the global.asax file.

Application or Session-Scoped Events

You can define handlers for HttpApplication events by writing methods in the global.asax file. These must conform to the naming pattern Application _EventName (AppropriateEventArgumentSignature ). For ...

Get Special Edition Using® Microsoft® ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.