Why does a call to a controller does not execute a delegating handler?
Well because they run down two different execution paths, if an MVC route matches it then executes an MVCHandler, while a delegating handler only executes when an Api route matches. In short the diagram above doesn’t describe the split correctly.
Delegating handlers run AFTER routing and before action selection. The routing and action selection steps get often confused or used interchangeably although they are two distinct steps.
Routing is the step that matches a url to a set of string segments to produce the RouteValues
which maps a route key to a route value. RouteValues
is then used in action selection. The delegating handlers run in between these two steps.
There is no equivalent in MVC for delegating handlers, a similar way to do it is to write your own handler but you are getting in some deep water there, particularly with link generation.
Another simpler approach is to write a global filter, but note that it will only run if an action was actually selected.
Line by line answers
Are HttpMessageHandlers a part of ASP.NET Web API but not of ASP.NET MVC?
Yes they are only WebAPI constructs.
What is the HttpMessageHandler equivalent in MVC (EQUIVALENT in the diagram)?
None really exist, and the diagram is wrong. The closest is a RouteHandler
What causes the request to follow the Web API pipeline (FORK in the diagram)?
Matching a WebAPI route
Are Web API requests fundamentally different that MVC requests?
No they are not, the fork happens only after routing.