开发者

Asp.Net MVC 2 - Invalid Route

开发者 https://www.devze.com 2023-01-12 11:07 出处:网络
Once the app is deployed to the web server, I type in an invalid route the mvc app just hangs and then displays a blank page.

Once the app is deployed to the web server, I type in an invalid route the mvc app just hangs and then displays a blank page.

On my local IIS, if I type an invalid route I get the exception: "System.Web.HttpException: The incoming request does not开发者_Go百科 match any route.". I want the exception not the blank page.

Any ideas?


It was a missing HttpHandler in the config file. My local config had the hanlder the config on the webserver did not.

<add verb="*" path="*.mvc" validate="false" 
     type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, 
           Version=2.0.0.0, Culture=neutral, 
           PublicKeyToken=31BF3856AD364E35"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号