ASP.NET MVC Message Handlers vs Web API Message Handlers

前端 未结 2 746
说谎
说谎 2021-01-17 16:02

I\'ve created 2 projects:

  1. Normal, basic ASP.NET MVC 4 application
  2. Basic ASP.NET WebAPI application

What I did is I added my custom mes

2条回答
  •  不思量自难忘°
    2021-01-17 16:43

    As shown below in the famous ASP.NET Web API: HTTP Message LIFECYLE diagram by Microsoft, the ASP.NET Web API has an additional extensibility point known as Message Handlers (section HTTP Message Handlers).

    So far ASP.NET MVC (5 currently) doesn't provide such extensibility point.

    [Link to the full size PDF poster]

    The only extensibility point that the MVC and WebAPI share (or at least conceptually) are Filters. Beware that MVC and WebAPI have different ways to register filters and this puts many people in a similar situation as the one you are in right now.

提交回复
热议问题