MVC routes lost after app pool recycle (updated title 3/3/14)

后端 未结 2 1692
野的像风
野的像风 2021-01-22 05:20

I am trying to deploy an ASP.NET MVC 4 web application to a production server (Windows Server 2008 R2 [x64] with SP1 installed, running IIS 7.5) that already has several other w

2条回答
  •  无人共我
    2021-01-22 05:50

    I want to give my 2 cents here. I had this exact behaviour on Windows Server 2012.

    My problem had nothing with configuration but the fact the global.asax was having an exception in the Application_Start and my code to register the routing table never occurred after the recycle. So if you have this behaviour, make sure you trap exceptions and handle them so all your code execute.

提交回复
热议问题