- 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
- AngularJS Testing Cookbook
- PHP程序設計(慕課版)
- Mastering Natural Language Processing with Python
- Unity Virtual Reality Projects
- 我的第一本算法書
- Mastering Julia
- Spring實戰(第5版)
- Amazon S3 Cookbook
- Scala編程實戰(原書第2版)
- 小學生C++創意編程(視頻教學版)
- Visual Basic程序設計實驗指導(第二版)
- Python High Performance Programming
- Learning Ionic
- Practical Maya Programming with Python
- Spring Boot學習指南:構建云原生Java和Kotlin應用程序