As SMARX pointed out, Applicaton_start () is always called, however, with your web role, if you have the full IIS role, then the VS2010 debugger does not fall into Application_start (). I write in detail below about how you can push BP on Application_Start () in Global.asax.cs:
First you can write the Debugger.Break () code in your Application_Start (), as shown below:
Now go to Roles Properties> Web and select
- Use the Visual Studio development server settings (I selected as shown in the figure below).
- Use local IIS web server
Now we are debugging your application and you will see a message as shown below to debug the W3WP.EXE process
Select the Debug option above, and then you will see the BS JIT Debugger window, as shown below:
After you accept the VS JIT debugger startup process, you will see PB hit your Applicaton_start (), as shown below:
What is it!
source share