What decodes my encoded hash symbol(%23)?
asp.net, c#, character-encoding, hash, iis
Solution
This is a bug in System.Web.dll. It is fixed on Windows 8.1, but we haven't yet rolled out a fix to System.Web.dll on downlevel versions of the operating system. We're trying to get a fix in for .NET 4.5.x for all supported OSes when the next reliability update comes out.
Problem
We noticed that several machines have problems with URLs with hash parameters. When debugging a request with the URL: `http://domain.com/Entity(%23{number-here}` We see in the `Application_BeginRequest` method in the `global.asax`file the URL: `http://domain.com/Entity(#23{number-here}` in `Url.OriginalString` and the `Url.LocalPath` has `http://domain.com/Entity(` and all the chars after the hash are in `Url.Fragment`. When running exactly the same application on machines running Windows 8.1 and IIS 8.5 it works as expected, the `Url.OrinalString` is `http://domain.com/Entity(%23{number-here}`. I can't see anything suspisous in the URL rewrite section in the `web.config` or in the IIS configuration. What can be the reason for this behaviour?