- Modern Web Development with ASP.NET Core 3
- Ricardo Peres
- 236字
- 2021-06-18 18:35:57
Routing
This chapter talks about routing, that is, the process by which ASP.NET Core translates a user request into an MVC controller and action. This can be a complex process because subtle changes in a request can lead to different endpoints (controller/action pairs) being called. Several aspects need to be taken into account: the protocol (HTTP or HTTPS), whether the user issuing the request is authenticated or not, the HTTP verbs, the path of the request, the query string, and the actual types of the path and query string parameter values.
Routing also defines what happens when a route is not matched, that is, the catch-all route, and it can be used for complex situations where we need to define custom route constraints.
ASP.NET Core offers different ways by which we can configure routing, which can be divided into convention-based and explicit configuration.
By the end of this chapter, you will be able to define routing tables and apply routing configuration in all of the different ways made available by ASP.NET Core for MVC applications.
The objectives of this chapter are listed here:
- Understanding endpoint routing
- Configuring routing
- Understanding routing tables
- Using route templates
- Matching route parameters
- Using dynamic routing
- Learning route selection through attributes
- Forcing host selection from attributes
- Setting route defaults
- Routing to inline handlers
- Applying route constraints
- Using route data tokens
- Routing to areas
- Using attributes for routing
- Using routes for error handling
- Pandas Cookbook
- MATLAB圖像處理超級學習手冊
- Python進階編程:編寫更高效、優雅的Python代碼
- Python機器學習算法與實戰
- 第一行代碼 C語言(視頻講解版)
- Building Wireless Sensor Networks Using Arduino
- Julia High Performance(Second Edition)
- Go語言入門經典
- 實驗編程:PsychoPy從入門到精通
- Extending Docker
- Python繪圖指南:分形與數據可視化(全彩)
- 歐姆龍PLC編程指令與梯形圖快速入門
- Java與Android移動應用開發:技術、方法與實踐
- FORTRAN程序設計權威指南
- Mastering PyCharm