I have been forced to upgrade Microsoft.AspNet.WebApi.Client and Microsoft.AspNet.WebApi.Core from version 5.0.0.0 to 5.2.0.0 due to a dependency on another project and now my API is throwing the error "A direct route cannot use the parameter 'controller'. Specify a literal path in place of this parameter to create a route to a controller".
The error gets thrown on initialisation of the HttpConfiguration within Global.asax.cs when calling
GlobalConfiguration.Configure(WebApiConfig.Register);
It seems to be the Core library that is causing the problem. When I updated just the Client it didn't throw the error.
I noticed that if I comment out the route attributes from all controllers within the project then it no longer throws the error, e.g.
[Route("api/storage/series/{series}/documentId/{documentId}")]
However removing these is not a viable solution due to the number of dependent applications.
On Google/Binging the error there's pretty much zero useful information on it. Can anyone offer any insight on this error and suggest how I might go about fixing it?