mvc 里面如果出现图片死链接,会报错
在 protected void Application_Error(Object sender, EventArgs e) 事件里面
用日志记录到很多死链接导致mvc抛出的异常
--------------------【结束】--------------------
时间: 2014/4/9 21:48:44
信息: System.Web.HttpException (0x80004005): 未找到路径“/Admin/Images/FileICO/ashx.gif”的控制器或该控制器未实现 IController。
在 System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
在 System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
在 System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory)
在 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
分类: 普通
优先级: 3
--------------------【开始】--------------------
路由里面配置忽略掉图片格式却没用。
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{resource}.gif/{*pathInfo}");
routes.IgnoreRoute("{resource}.jpg/{*pathInfo}");
routes.IgnoreRoute("{resource}.png/{*pathInfo}");
routes.IgnoreRoute("{resource}.php/{*pathInfo}");
routes.IgnoreRoute("{resource}.jsp/{*pathInfo}");
大家给支个招。