Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3940954
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:28:56+00:00 2026-05-20T00:28:56+00:00

I’ve recently added Microsoft Unity to my MVC3 project and now I’m getting this

  • 0

I’ve recently added Microsoft Unity to my MVC3 project and now I’m getting this error:

The controller for path ‘/favicon.ico’ could not be found or it does not implement IController.

I do not really have a favicon.ico so I have no idea where that’s coming from. And the weirdest thing is that the view is actually being rendered and THEN this error is being thrown… I am not sure if it’s something wrong with my controller factory class because I got the code from some tutorial (I’m not to IoC – this is the first time I do that). Here’s the code:

public class UnityControllerFactory : DefaultControllerFactory
{
IUnityContainer container;

public UnityControllerFactory(IUnityContainer _container)
{
    container = _container;
}

protected override IController GetControllerInstance(System.Web.Routing.RequestContext requestContext, Type controllerType)
{
    IController controller;

    if(controllerType == null)
        throw new HttpException(404, string.Format("The controller for path '{0}' could not be found or it does not implement IController.",
            requestContext.HttpContext.Request.Path));

    if(!typeof(IController).IsAssignableFrom(controllerType))
        throw new ArgumentException(string.Format("Type requested is not a controller: {0}",
                                                            controllerType.Name),
                                                            "controllerType");
    try
    {
        controller = container.Resolve(controllerType) as IController;
    }
    catch (Exception ex)
    {
        throw new InvalidOperationException(String.Format(
                                "Error resolving controller {0}",
                                controllerType.Name), ex);
    }
    return controller;
}

}

Any suggestions?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:28:57+00:00Added an answer on May 20, 2026 at 12:28 am

    This has nothing to do with your controller factory specifically, but it is something you can easily address.

    If you are using a Webkit browser (Chrome specifically, Safari too- I think), a request to any website will automatically be accompanied by a request to ‘/favicon.ico’. The browser is attempting to find a shortcut icon to accompany your website and (for whatever reason) the default path for shortcut icons has been standardized to be ‘/favicon.ico’.

    To avoid the error you’re getting, simply define an IgnoreRoute() within the routing table of your MVC web application:

    RouteTable.Routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.([iI][cC][oO]|[gG][iI][fF])(/.*)?" });
    

    This will ensure that any request to ‘/favicon.ico’ (or ‘/favicon.gif’) will not be handled by MVC.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.