We recently ran into some URL encoding issues in one of our MVC projects when it came to custom routing. When encoding the string "IIS 7+" using System.HttpUtility.UrlEncode() the resulting output was "IIS+7%2b" which when decoded gave us "IIS 7 " which is incorrect.
We then played around with System.HttpUtility.UrlPathEncode() in which the resulting output was "IIS%207+" which was breaking in IIS.
The solution, System.Uri.EscapeDataString()
This method appears to be much more reliable compared to the other two methods and did the trick for us. Simply decode using System.Uri.UnescapeDataString()
Furthermore, to enable plus signs in the URL path, the following web.config entry is required.
<security> <requestfiltering allowdoubleescaping="true" /> </security>
As you can see this is a rather quick & simple implementation that takes little to no time when known about.