在 IIS 7 使用 ASP.NET MVC 5,Routing 功能會無法正常運作,會看到 403 或是 404 頁面。
這邊可以在 Web.Config 的 modules 這邊加上 runAllManagedModulesForAllRequests="true"
設定,並為網站加上 UrlRoutingModule-4.0
模組。
1 | ... |
沒意外的話就會運作正常了。
謙卑學習,持之以恆,才能不斷的Level Up
在 IIS 7 使用 ASP.NET MVC 5,Routing 功能會無法正常運作,會看到 403 或是 404 頁面。
這邊可以在 Web.Config 的 modules 這邊加上 runAllManagedModulesForAllRequests="true"
設定,並為網站加上 UrlRoutingModule-4.0
模組。
1 | ... |
沒意外的話就會運作正常了。