Oct 15 2008

Conflict between HttpUtility.UrlEncode and IIS7

Category: .NetRory Primrose @ 07:03

I have previously posted about the issues I had with CS on IIS7 with + characters in urls. Under the default configuration, IIS7 returns a 404 error because it is concerned about double escaping. With my migration from CS to BlogEngine.Net, I wanted to maintain existing incoming CS links. This means that I still needed to support + characters in urls.

I also found that the TagCloud control in BlogEngine.Net renders + characters as well. After looking at the code, it eventually calls down into HttpUtility.UrlEncode. This code uses + instead of %20 for encoding spaces. This is a big problem. Any code that uses the HttpUtility.UrlEncode (which is very common), will prevent pages being served correctly on IIS7 without using the workaround indicated in the previous post.

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading