Routing and dispatching
The routing and dispatching stage primarily involves the execution of a series of message handlers, which process the incoming request and then delegate them to the next message handler for processing. In earlier versions of ASP.NET Web API, we could only configure message handlers globally per application. All the message handlers were added to the HttpConfiguration.MessageHandlers
collection and were executed for each request. The global configuration was enabled using the Register
method in the WebApiConfig.cs
file, which gets added when creating a new ASP.NET Web API project. We talk more about the WebApiConfig
and Register
method in the Creating our first ASP.NET Web API section. The following snippet show a sample ...
Get Building Web Services with Microsoft Azure now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.