Why is global.asax missing from a Website Project

Dor Rotman picture Dor Rotman · Mar 25, 2009 · Viewed 20k times · Source

A couple of questions regarding the role of global.asax:

  1. Why is it not included in the Website Project in Visual Studio? Are there other ways of achieving the same functionality without this file?

  2. If I would create a Web Application project, as far as I remember, a global.asax file would be created. If I were to delete it, would the project run?

I tried to look for some explanation regarding the global.asax compilation but didn't find any info about this.. would appreciate help/links. :)

Thanks!

Answer

Shoban picture Shoban · Mar 25, 2009

An ASP.NET site can run without the global.asax file. Here is a question which talks about alternatives of global.asax file.

Even if you delete a global.asax file your site will work.