Skip to main content

URL Routing: Part I

  • Chapter
  • First Online:
Expert ASP.NET Web API 2 for MVC Developers
  • 1425 Accesses

Abstract

In Chapter 19, I explained that URL routing is integrated into the Web API dispatch process by one of the built-in message handlers. In this chapter, I explain how URL routing works in a Web API application and demonstrate how to create convention-based routes, where routes are defined in a single place and used to match requests to controllers and actions throughout the application, known as convention-based routing. In Chapter 21, I continue on the topic of URL routing and show you a different approach that defines routes through attributes applied to controller classes and action methods, known as direct or attribute-based routing. Table 20-1 summarizes this chapter.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Adam Freeman

About this chapter

Cite this chapter

Freeman, A. (2014). URL Routing: Part I. In: Expert ASP.NET Web API 2 for MVC Developers. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0085-8_20

Download citation

Publish with us

Policies and ethics