关于如何在ASP中提供favicon.ico,最终/最好的建议是什么?净MVC吗?
我目前正在做以下事情:
routes.IgnoreRoute("favicon.ico");
Placing favicon.ico in the root of my application (which is also going to be the root of my domain).
I have two questions:
Content
and Controllers
.Is this IgnoreRoute("favicon.ico")
statement sufficient - or should I also do the following as discussed in a blog post from Phil Haack. I'm not aware of ever having seen a request to favicon.ico in any directory other than the root - which would make this unnecessary (but it's good to know how to do it).
routes.IgnoreRoute("{*favicon}", new {favicon=@"(.*/)?favicon.ico(/.*)?"});