#39;+#39; symbol problem in URL in IIS 7.x(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 中的“+"符号问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:IIS 7.x 中 URL 中的“+"符号问题
基础教程推荐
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- WPF 模态进度窗口 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
