【问题标题】:ASP.NET URL ending in /%20/ is not getting to application code以 /%20/ 结尾的 ASP.NET URL 未访问应用程序代码
【发布时间】:2014-10-14 15:08:43
【问题描述】:

如果有这样的网址:

https://someserver/somewebApp/%20/ ~ http 也有同样的问题。

似乎 IIS (v7.5) 存在缺陷,因为对 URL 评估的控制似乎没有传递给应用程序?

谁能确认他们以前看过这个? 是否有 Microsoft 对缺陷的引用(我找不到)?

回答关于收到错误的评论 - 没有提供子代码(至少由提琴手提供):

HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET

【问题讨论】:

  • 错误是什么?你得到 HTTP 500 了吗?如果是,子代码是什么?
  • @Tony - 从提琴手拦截添加错误。
  • 您可以将其添加到您的 webconfig <httpRuntime> relaxedUrlToFileSystemMapping="true"。但是,它会引发安全问题。

标签: asp.net iis url-rewriting


【解决方案1】:

一般 %20 代表 url 中的空格。所以你的网址会像 /somewebApp/ /。这可能是个问题,因为它不是有效的 url。 您可以参考以下关于 %20 的链接

http://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20

【讨论】:

    猜你喜欢
    • 2010-11-10
    • 1970-01-01
    • 2016-08-05
    • 1970-01-01
    • 1970-01-01
    • 2013-07-28
    • 1970-01-01
    • 2012-02-13
    • 1970-01-01
    相关资源
    最近更新 更多