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

后端 未结 12 1496
独厮守ぢ
独厮守ぢ 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:26

    Below technique worked for me:
    Simple workaround is to touch global.asax after the debugger is attached in order to force an application recycle. Then during the next request, the break point that you set on Application_Start will be hit.

    I found this here:
    http://connect.microsoft.com/VisualStudio/feedback/details/634919/cannot-debug-application-start-event-in-global-asax

提交回复
热议问题