There seems to *still* be a problem with UrlPathEncode method in HttpUtility class (and others). ‘#’ doesn’t seem to be encoded properly. Here’s a quick way to do it.
string newUrl = HttpUtility.UrlPathEncode(url).Replace(“#”, “%23”);
I hope this gets fixed in the next framework iteration.