Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'+' symbol problem in URL in IIS 7.x

We are sending an HTML encoded string in the Query string. It was working fine on IIS 6 (windows 2003). We have recently moved the website to Windows 2008 (IIS 7.x). Since the move any Query String that contains "+" sign i.e., "%2b" gives error on the server "404 - File or directory not found."

Any help?

Best regards.

like image 866
Kashif Avatar asked Jan 05 '11 13:01

Kashif


1 Answers

The reason why you are facing this error is that IIS7 has introduced new URL filtering rules for security reasons. So '+' sign is blocked by default as part of security reason in URL.

To resolve this issue you have to set allowDoubleEscaping="true" in web.config files. Here is the tag to do that.

<system.webServer>
<security>
  <requestFiltering allowDoubleEscaping="true">
  </requestFiltering>
</security>

like image 144
DOTNET Team - WeblineIndia Avatar answered Oct 20 '22 15:10

DOTNET Team - WeblineIndia