IHttpRoute.GetRouteData never gets called?

Topics: ASP.NET Web API
Jul 25, 2013 at 4:18 PM
I'm trying to adapt the example of the RegexRoute* to Web API which means implementing IHttpRoute. I have implemented all the members and set breakpoints and it seems that no matter what value RouteTemplate has, GetRouteData never gets called, meaning the interface gets violated!

In other words, the route matching always happens by parsing the RouteTemplate and without GetRouteData()

What gives?

Jul 25, 2013 at 4:41 PM
I think you are hitting the following known issue which was fixed. Which version of "Microsoft.AspNet.WebApi.WebHost" package are you using?

Jul 25, 2013 at 5:02 PM
I'm on the latest stable - 4.0.30506.0 - was this fixed in 5.0? Any chance for a 4.0 hotfix?
Jul 25, 2013 at 5:48 PM
Unfortunately looks like the bug fix didn't make it into the version you have. I currently cannot think of a workaround but will let you know otherwise.