It appears that in .NET 3.5 and below, and in ASP.NET, the following url is unescaped. Is there a way to avoid this behaviour?
var strUrl = "https://url.com/file%2F.pdf";
var uri = new Uri(strUrl);
var strUri = uri.ToString();
if (strUrl != strUri)
{
throw new Exception("bug!"); // Happens in below .NET 4
}