https://msdn.microsoft.com/en-us/library/system.uri(v=vs.110).aspx
According to the reference above, when specifying an ftp url, the uri class should not compact the url. For example, the following ftp url:
Uri uri = new Uri("ftp://myUrl/%2E%2E/%2E%2E");
Console.WriteLine(uri.AbsoluteUri);
Console.WriteLine(uri.PathAndQuery);
should result in:
AbsoluteUri: "ftp://myUrl/%2E%2E/%2E%2E
"
PathAndQuery: "/%2E%2E/%2E%2E
"
But, this is NOT what I'm seeing. When I execute the above code using .NET framework 4.5.1, I see:
AbsoluteUri: "ftp://myUrl/
"
PathAndQuery: "/
"
Moreover, adding to my app.config seems to have no effect:
<uri>
<schemeSettings>
<add name="ftp" genericUriParserOptions="DontUnescapePathDotsAndSlashes" />
</schemeSettings>
</uri>
Since several people have been able to recreate the issue, I've created a bug report with Microsoft. Feel free to upvote: