I want to handle application shutdown gracefully when stopping debugging or stopping the IIS Express web site, but I cannot seem to get Application_End to run.
You can click the Debug | Step Over menu or press the keyboard shortcut F10 to execute the current line and jump into the next line for execution.
If you're not sure how to step line, by line, put a breakpoint where you want to start debugging line by line (or pause the app) then use F10 as "Step Over" or F11 as "Step Into" instead of F5 ("Go").
If you're debugging using IIS Express, the Application_End function will execute if you right-click on the IIS Express icon on the tray, select the proper site from the context menu and stop it. This will end your debugging session in a way that does execute the Application_End method.
Try to make a change in web.config and save.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With