What is the need for favicon.ico. I am trying to use MVC error handling and it complains about a missing file. How to get rid of this error.
thanks
Go to the RegisterRoutes method of the Global.asax.cs file and add it as one of the first lines:
RegisterRoutes
routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
I suggest you use it instead of getting rid of it. This is part of the web standards in user interface design. You do not like the branding of your site? Then this is a key part of this branding.
Decision:
<link rel="SHORTCUT ICON" href="http://www.youraddress.com/youricon.ico"/>" If you use localhost, then href =" http: // localhost: port / youricon.ico "Note : use a different name instead of favicon.ico.
<link rel="SHORTCUT ICON" href="http://www.youraddress.com/youricon.ico"/>"
Add the following to the beginning of your RegisterRoutes method:
routes.IgnoreRoute ("favicon.ico");
Your browser will always request a site for the icon, this ensures that mvc does not try to solve it.
Source: https://habr.com/ru/post/892138/More articles:Ruby on Rails: how to sort a collection_select - sortingreplace all instances of the substring with a variable string - stringC ++ custom allocator that uses the underlying memory pool - c ++Python Multiprocess diff between Windows and Linux - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/892137/jquery-design-pattern-for-selectors-to-improve-code-maintainability&usg=ALkJrhicU9w6CTsk5huC5JvZmnGkfDEhpQProblem with TreeNode.BeginEdit () - c #How to make MSBuild ignore project links? - msbuildAndroid reverse engineering - androidjavascript RFC 3986 implementation? - javascriptRegular expression to match shared url - javascriptAll Articles