您的位置:首页 > 大数据 > 人工智能

The controller for path '/favicon.ico' could not be found or it does not implement the IController interface./r/nParameter name:

2010-08-24 15:08 931 查看
The Routing system no longer special-cases the period character. 
Take a look at the Global.asax provided with the April codeplex
templates:

1   
            routes.MapRoute(
2   
                "Default"
,                                              // Route name

3   
                "{controller}/{action}/{id}"
,                           // URL with parameters

4   
                new
{ controller = "Home"
, action = "Index"
, id = ""
}, // Parameter defaults

5   
                new
{ controller = @"[^/.]*"
}                          // Parameter constraints

6   
            );

Note that on line (5) above, we're constraining the controller
parameter such that periods are invalid characters, so the routing
system won't bother looking for the favicon.ico
controller.

Try adding a similar constraint to your registered routes.  Hopefully this will solve your issue. :)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐