WebGet UriTemplate fails on dot ('.'/%2E)?
I've been trying for a while now to figure out why this UriTemplate does not work as part of a WCF service and can't seem to get anywhere:

    [WebGet(UriTemplate="api/1.0/version")]
    string GetVersion();

A quick test shows that UrlTemplateTable matches it fine (output is 'api/1.0/version'):

    static void Main(string[] args)
    {
    	Uri prefix = new Uri("http://localhost/");
    	System.UriTemplateTable table = new System.UriTemplateTable(prefix);
    	table.KeyValuePairs.Add(new KeyValuePair<UriTemplate, Object>(new UriTemplate("api/1.0/version"), "a"));
    	table.KeyValuePairs.Add(new KeyValuePair<UriTemplate, Object>(new UriTemplate("api/2.0/version"), "b"));
    	table.KeyValuePairs.Add(new KeyValuePair<UriTemplate, Object>(new UriTemplate("api/version"), "c"));
    
    	Uri uri = new Uri("http://localhost/api/1.0/version");
    	UriTemplateMatch match = table.MatchSingle(uri);
    	Console.WriteLine("{0}", match.Template.ToString());
    }

The dot is not an illegal character in URLs, RequestPathInvalidCharacters does not exclude it, there are no rewrite rules in place that could interfere. Couldn't find anything in the documentation on it either.

While there is an obvious workaround, not use the dot in the template, I'm curious as to why it fails with 'HTTP 404/The resource cannot be found'.
WebGet UriTemplate fails on dot ('.'/%2E)?
===

I've been trying for a while now to figure out why this UriTemplate does not work as part of a WCF service and can't seem to get anywhere:

    [WebGet(UriTemplate="api/1.0/version")]
    string GetVersion();

A quick test shows that UrlTemplateTable matches it fine (output is 'api/1.0/version'):

    static void Main(string[] args)
    {
    	Uri prefix = new Uri("http://localhost/");
    	System.UriTemplateTable table = new System.UriTemplateTable(prefix);
    	table.KeyValuePairs.Add(new KeyValuePair<UriTemplate, Object>(new UriTemplate("api/1.0/version"), "a"));
    	table.KeyValuePairs.Add(new KeyValuePair<UriTemplate, Object>(new UriTemplate("api/2.0/version"), "b"));
    	table.KeyValuePairs.Add(new KeyValuePair<UriTemplate, Object>(new UriTemplate("api/version"), "c"));
    
    	Uri uri = new Uri("http://localhost/api/1.0/version");
    	UriTemplateMatch match = table.MatchSingle(uri);
    	Console.WriteLine("{0}", match.Template.ToString());
    }

The dot is not an illegal character in URLs, RequestPathInvalidCharacters does not exclude it, there are no rewrite rules in place that could interfere. Couldn't find anything in the documentation on it either.

While there is an obvious workaround, not use the dot in the template, I'm curious as to why it fails with 'HTTP 404/The resource cannot be found'.