This chapter introduces the concepts behind ASP.NET Web API routing mechanisms. It deals with centralized routing and direct (attribute) routing, which was introduced in version 2 of the framework.

You will learn how to do the following:

  • Define routes using both routing engines (Recipes 3-1 and 3-2)
  • Use default and optional route values, and apply routing constraints (Recipes 3-3, 3-4, and 3-5)
  • Support remote procedure call (Recipe 3-6)
  • Define greedy “catch-all” routes and prevent controller methods from becoming routes (Recipes 3-7 and 3-8)
  • Apply a message handler to a specific route and use that technique to ignore certain ...

Get ASP.NET Web API 2 Recipes: A Problem Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.