Handlers like IRouteHandler in MVC and HttpMessageHandler in Web API do not work with attribute routing. A user implementing IDirectRouteProvider might supply these handlers even though these handlers would never work. Instead of this we can throw an error message upfront when building the route table so that users know the issue rather than spending hours to detect this.
↧