Rodrigo Gama Rodrigo Gama - 1 year ago 129
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download