I have the following Web Service interface (a WCF service) method defined:
[WebInvoke(Method = "POST", UriTemplate = "sites/{siteId}/storage/{*filePath}", BodyStyle = WebMessageBodyStyle.Bare)]
[OperationContract]
FileUploadResultDto UploadMultipart(Stream fileData, string siteId, string filePath);
If I do a HTTP POST request to: "(host)/sites/1234/storage/%D0%BC%D0%B0%D0%BC%D0%B0.html" (this is the URL-encoded version of "мама.html")
Parameter filePath is read as "мама.html", which is wrong.
I'd like it to be directly read as "мама.html".
However, "м" is the html-encoded version of the "м" character.
Why is WCF/UriTemplate behaving this way? How can I directly obtain a direct representation of the string, and not have some of the character html-encoded? Is there a setting in web.config for this? Is it a bug?