Routing and UriTemplating for RESTful web services

Topics: Web Api
Jan 28, 2011 at 8:11 PM

OK, so there's MSDN documentation for .Net 4 routing here at

and documentation for .Net 4 uritemplating here at

Now the question is what does and does not apply for the new WCF RESTful web APIs for the current Preview 3?

Is there any discussion a little more definitive than "just mix and match"? Any precedence/priority/order rules on parameters for methods? Must HttpRequestMessage and HttpResponseMessage parameters follow after any parameters extracted from the URI template?

Should I resort to trial and error experimentation to discover these things? Or is there any hope of some better documentation reflecting the current intended design (even if the design continues to evolve and change for future releases)?


Jan 29, 2011 at 8:32 PM

Hi @ctawell

Documentation is sparce at this time, but we are working on it. I can answer your questions though :-)

First, in terms of what we support, there are the codeplex bits and the real bits. Currently our codeplex bits are a sort of a hybrid of our real bits we are developing and a bunch of prototype code. Soon that will be replaced.

  • In our real bits, all of the above will be supported. End of story :-)
  • In our Codeplex bits, the one thing that does not currently work is setting the UriTemplate to "*". Other than tha all other aspects of Uri templates should work.
  • Routing should be indentical with the codeplex bits. The one change is the new configuration object which brings more code-based config to the table and allows passing that to the route.
  • Now in terms of precedence rules for params, there is no specific order required for the new messages. Our logic simply looks for their presence by type in the signature. They are not used as part of the uri template match.

Hope this helps and appreciate your patience.


Jan 30, 2011 at 1:06 AM

Thanks for this reply.

Please see other new posts from me on separate topics....