Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Controller factory receiving request for "favicon.ico"

I've noticed that a request to "favicon.ico" is being passed to my ASP .NET MVC controller factory when using Google Chrome and the Visual Studio Development Server. The controllerType parameter has a value of null which is unsurprisingly resulting in an unhandled exception, which I only know about because of an error log.

Any ideas where the request is coming from and why ASP .NET is letting it get to the controller factory? CSS files and images for example are being correctly filtered out.

like image 557
Ian Warburton Avatar asked Apr 01 '11 00:04

Ian Warburton


People also ask

What is favicon ico HTTP?

A favicon (/ˈfæv. ɪˌkɒn/; short for favorite icon), also known as a shortcut icon, website icon, tab icon, URL icon, or bookmark icon, is a file containing one or more small icons, associated with a particular website or web page.

Where would we typically see a file whose name is ordinarily favicon ico?

The favicon. ico is a small icon found in the URL address bar and on bookmarks created by web browsers. ) in the front of the Computer Hope URL.

Why do we use favicon ico?

Favicon format Originally, all favicons were created as ICO files—a format developed by Microsoft to store Windows program icons. The biggest advantage of this format is that it can store images of different sizes in a single file.


1 Answers

With IIS7 in integrated mode all requests are tunneled to the pipe. you can add it to your ignore routes

asp.net mvc does it handle all requests? - iis 7 integrated mode

Another resource

http://weblogs.asp.net/gunnarpeipman/archive/2009/02/26/asp-net-mvc-ignore-requests-to-favicon-ico.aspx

Bear in mind to you only seeing this as you are in debug mode. Your users wont see it (Not optimal still, but hey I didn't design it)

like image 86
Slappy Avatar answered Sep 19 '22 01:09

Slappy