When you add a global.asax file to your "Web Application Projects (WAPs like below:
and then write code in Application_Start event and try to debug it like below using Visual Studio inbuilt Web Server
Then during your first debug the breakpoint is hit but during your subsequent debug runs the breakpoint is not hit.
The reason behind this is that we do not kill the ASP.Net Web Server process after your every debug run and hence Application_Start() is not fired every time. There is a good reason why we do so... Starting ASP.Net Web Server process is an expensive task and in most of the scenarios recycling this process after every debug would adversely impact your performance... If you do not want to debug your Application_Start() method then probably you do not need to have the process restart and save performance most of the time...
However if you would like to have the breakpoint hit you have few easy workarounds... One of the workaround is that you stop the web server from your system tray as in the figure below:
Alternatively you can go to your property pages of your web application and enable Edit & Continue like shown below:
When you choose Edit and Continue then we recycle the ASP.Net Web Server process on every debug run (it is needed for the Edit & Continue functionality to work)... This way although you will see very marginal degrade in your performance you will still be able to debug your Application_Start() methods...
Hope this helps...
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :