Donate

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

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.

Invalid nested tag div found, expected closing tag input