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. :)
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. :)
相关文章推荐
- DevExpress Exception Solution - The target "X" for the callback could not be found or did not implement ICallbackEventHandler
- "The target '__Page' for the callback could not be found or did not implement ICallbackEventHandler."的解决办法
- 关于错误 The type or namespace name `Vuforia' could not be found. Are you missing an assembly reference?
- 如何解决The type or namespace name 'ScriptService' could not be found (are you missing a using directive or an assembly reference?)
- mybatis 引用对象属性映射错误 or could not be found for the javaType (xxx.model) : jdbcType (null) combination.
- Exchange 2013 DAG报错“The fully qualified domain name for node “DAG” could notbefound”解决方法
- Unity发布时出现“The type or namespace name `UnityEditor' could not be found.”
- The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace
- WCF分布式开发常见错误(4):The type or namespace name 'DataContract' could not be found DataContract找不到
- The plugin 'org.apache.maven.plugins:maven-eclipse-plugin' does not exist or no valid version could be found 解决
- .net4 wpf App 使用log4net 错误:The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly reference?)
- Unity发布时出现“The type or namespace name `UnityEditor' could not be found.” 错误
- The type or namespace name 'AjaxControlToolkit' could not be found in the global namespace
- Unity使用FXMaker导致发布时报“The type or namespace name `UnityEditor' could not be found” 解决备忘
- The type or namespace name 'DbContext' could not be found-vs2012
- The type or namespace name 'log4net' could not be found (are you missing a using directive or an assembly refere
- MSbuild failure: error CS0246: The type or namespace name 'DataLoader_Accessor' could not be found
- The page you requested, favicon.ico, could not be found. in file **/system/core/Kohana.php on line 841
- The type or namespace name '***' could not be found (are you missing a using directive or an asse
- The type or namespace name `MovieTexture' could not be found. Are you missing an assembly reference?