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

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

    I hit with the same problem today and was using Local IIS.

    I believe this arises because because of the way page is loaded. All you need to do is, put a breakpoint in Application_Start. Run the application(In my case, it took to Login Screen ) and then go to web.config. Edit it - by adding some spaces. and then refresh in Browser.that will hit the breakpoint on Application_Start.

提交回复
热议问题