WCF UriTemplate will not match a single string parameter with slashes (/ s)

Here is the scenario, I have a call to the WCF service that takes one string parameter, and this line has slashes in it (for example, "123 / 456.xml"). I want to configure the UriTemplate as this "/ {file}" so that I can access the http://www.example.com/File.svc/123/456.xml method , not http: //www.example. com / File.svc / GetFile? file = 123 / 456.xml .

Is this possible with UriTemplate?

  • I understand that I could configure UriTemplate as "/ {directory} / {file}", but this is not an option because there is a variable number of directories.
+3
source share
1
+3

Source: https://habr.com/ru/post/1736196/


All Articles