Why does not the Application_Start() event fire when I debug my ASP.NET MVC app?

后端 未结 12 1728
独厮守ぢ
独厮守ぢ 2021-01-30 16:01

I currently have the following routines in my Global.asax.cs file:

public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRout         


        
12条回答
  •  别跟我提以往
    2021-01-30 16:27

    The problem is Application_Start() triggers first then the debugger attaches.

    So the goal is to do something that would cause Application_Start() to trigger again while its still running. For debugging purposes, just run the debugger like you normally do then edit (eg add a newline) and save the web.config file.

提交回复
热议问题