IIS 7.x 中 URL 中的“+"符号问题 [英] '+' symbol problem in URL in IIS 7.x

查看:37
本文介绍了IIS 7.x 中 URL 中的“+"符号问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在查询字符串中发送一个 HTML 编码字符串.它在 IIS 6(Windows 2003)上运行良好.我们最近将网站移至 Windows 2008 (IIS 7.x).由于移动任何包含+"号的查询字符串,即%2b"在服务器上给出错误404 - 找不到文件或目录."

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."

有什么帮助吗?

最好的问候.

推荐答案

您遇到此错误的原因是 IIS7 出于安全原因引入了新的 URL 过滤规则.因此,作为 URL 中安全原因的一部分,默认情况下会阻止+"号.

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.

要解决此问题,您必须在 web.config 文件中设置 allowDoubleEscaping="true".这是执行此操作的标签.

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>

这篇关于IIS 7.x 中 URL 中的“+"符号问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆