I have a Message Handler in my Web API 2 project which change the url to a different path. Such as url "root/controller/somevalue/detials"
will be changed to "root/controller/2/details"
. Where "somevalue" or 2 is a parameter for the action method.
I have placed the message handler registration code before calling
config.MapHttpAttributeRoutes();
Message handler is registered as
config.MessageHandlers.Add(new MyHandler());
For normal route mapping it is working fine. But if I enable attribute based routing then the message handler is called and changed the url but action method is hit with the same "somevalue" not "2".
What is happening here?