The Controller For favicon.ico Does Not Implement IController
In an application using Controller factory, i encountered an error as stated in the title. My MVC does not have a favicon.ico. The solution is to add a parameter constraint that does not allow .ico filenames in your routes.
I got the solution from forums.asp.net
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "ProductView", action = "Index", id = "" }, // Parameter defaults
new { controller = @"[^\.]*" } // Parameter constraints (regex/string expression)
);
Comments
Post a Comment