2

I have the following in my MVC routing file:

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });

Can someone explain to me what these are used for? Also do they need to appear before the MVC and WebAPI routes ?

1 Answers1

1

The route with the pattern {resource}.axd/{*pathInfo} is included to prevent requests for the Web resource files such as WebResource.axd or ScriptResource.axd from being passed to a controller.

The favicon route is to prevent the favicon to be mapped to a route.

Read more here: MSDN Favicon

Amir Popovich
  • 29,350
  • 9
  • 53
  • 99