Rodrigo Gama Rodrigo Gama - 4 months ago 43
ASP.NET (C#) Question

Asp.NET Global.asax - application lifecycle

I am using Visual Studio 2005, and running my application from inside it, directly using its development application server.

If I set a breakpoint inside Application_Start and one inside Session_Start, the latter is reached first, and I honestly think it should be the other way around.

Any thoughts?


by default, the Application_Start event will not be hit again whilst running the application unless the web development server is stopped and restarted.

There's a setting in Visual Studio to force the web development server process to be recycled on each launch. Simply right-click the project file > Web > check Enable Edit and Continue. This forces a recycle of the ASP.Net Web Server process on every debug run.