Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

Sponsors

News

 
 
 
DZone MVB

Links

Social

ASP.NET MVC: Ignore requests to favicon.ico

One problem I faced when writing my example pet portal on ASP.NET MVC was Google Chrome’s request to favicon.ico that doesn’t exist. IE8 that I use (8.0.7000.0) doesn’t make these blind requests to discover that favicon.ico is not there. Solution to my problem was very simple. Just add the ignore rule for favicon.ico to Global.asax file, in the beginning of RegisterRoutes method:

 

NB! This blog is moved to gunnarpeipman.com

Click here to go to article

Comments

ASP.NET MVC Archived Blog Posts, Page 1 said:

Pingback from  ASP.NET MVC Archived Blog Posts, Page 1

# February 27, 2009 1:53 AM

Christopher Steen said:

Link Listing - February 26, 2009

# February 27, 2009 7:48 AM

Christopher Steen said:

Podcasts Recording of Sebastien Lambla @ E-VAN 25 February 2009 [Via: Jan Van Ryswyck ] DNN Change...

# February 27, 2009 7:48 AM

Trevor said:

I was adding some error logging code to my application last weekend when I kept getting the "File not found" error for favicon.ico. In the end i just created the damn thing to shut it up. But I prefer your solution, thanks!

# February 27, 2009 1:07 PM

ASP.NET MVC: Ignore requests to favicon.ico - Gunnar Peipman's ASP … said:

Pingback from  ASP.NET MVC: Ignore requests to favicon.ico - Gunnar Peipman's ASP …

# March 2, 2009 9:44 AM

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# April 4, 2009 1:30 AM

DotNetShoutout said:

Thank you for submitting this cool story - Trackback from DotNetShoutout

# April 4, 2009 1:31 AM

Tiendq said:

Thank you for the solution, I'm going to add a global error handler for my current MVC project and favicon.ico request is very annoying.

# April 22, 2009 12:32 PM

chrispont said:

Perfect! This will really help, as I'm using an error handler to email me site errors and continually get emails regarding favicon.ico.

# May 28, 2009 5:56 AM

luke.sampson said:

Thanks Gunnar, very helpful!

# January 17, 2010 6:37 PM

Twitter Trackbacks for ASP.NET MVC: Ignore requests to favicon.ico - Gunnar Peipman's ASP.NET blog [asp.net] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 ASP.NET MVC: Ignore requests to favicon.ico - Gunnar Peipman's ASP.NET blog         [asp.net]        on Topsy.com

# October 25, 2010 6:42 PM