【问题标题】:allowdoubleescaping = "true" in IIS Express Config Not WorkingIIS Express 配置中的 allowdoubleescaping = "true" 不起作用
【发布时间】:2019-10-21 02:45:32
【问题描述】:

我收到 HTTP 错误 404.11 - 未找到 请求过滤模块被配置为拒绝包含双转义序列的请求。 当我向 Blazor 中的 .razor 页面发送请求时出错,链接是动态构建的并发送给用户电子邮件:

string confirmationLink = $"{HttpContext.Request.Scheme}://{Request.Host}/account/confirmemail/{System.Web.HttpUtility.UrlEncode(user.Id)}/{System.Web.HttpUtility.UrlEncode(confirmationToken)}";

我在五个地方修改了 IIS Express 配置文件:

  • “C:\Windows\System32\inetsrv”中的 web.config
  • applicationhost.config 在 "C:\Program Files\IIS Express\AppServer"
  • “C:\Program Files\IIS Express\config\templates\PersonalWebServer”中的applicationhost.config
  • “C:\Program Files (x86)\IISExpress\AppServer”中的applicationhost.config
  • “C:\Program Files(x86)\IIS Express\config\templates\PersonalWebServer”中的applicationhost.config

在所有情况下我都修改了

<requestFiltering allowDoubleEscaping="true">

“web.server”“安全”部分中的标记。但我仍然得到错误。有什么解决办法吗?

【问题讨论】:

标签: visual-studio iis-express blazor


【解决方案1】:

这对我有用...

  1. 为了找到 IISExpress 的 applicationhost.config 文件,我在系统托盘(Windows 10 的右下角)中查找了 IIS Express 图标。
  2. 我右键单击 IIS Express 图标并单击 "Show All Applications"
  3. Running Applications 的列表中,我单击了要修改其配置文件的Site Name
  4. 点击站点名称后,下方出现Config: 一词。
  5. 我单击了Config: 右侧的路径,这在Visual Studio 中打开了applicationhost.config 文件。
  6. 在那里我点击了Ctrl-F并搜索了&lt;requestFiltering&gt;,我将其更改为&lt;requestFiltering allowDoubleEscaping="true"&gt;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-03-05
    • 2020-12-26
    • 2013-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多