解决方法
http://jason.whitehorn.ws/2008/06/17/Friendly-404-Errors-In-ASPNET-MVC.aspx给出以下说明:
routes.MapRoute("Error","{*url}",new { controller = "Error",action = "Http404" });
任何与其他规则不匹配的请求都会路由到错误控制器的Http404操作,您还需要配置它:
public ActionResult Http404(string url) { Response.StatusCode = 404; ViewData["url"] = url; return View(); }