Wednesday, March 23, 2011

Can't undersand it

Re: The controller for path /favicon.ico does not implement IController
Apr 26, 2008 12:37 AM

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. :)


And issue appears on when:
AppControllerFactory{...
public override IController CreateController(RequestContext requestContext, string controllerName)
{

//object controller = _kernel.TryGet(controllerName.ToLowerInvariant());

return base.CreateController(requestContext, controllerName);
}

WTF!!!????

No comments:

Post a Comment