【发布时间】:2019-06-12 12:40:33
【问题描述】:
我正在使用 asp.net 身份,GenerateEmailConfirmationTokenAsync 给了我一个用于电子邮件确认的令牌。我不能在确认网址中使用此代码,因为它会出错:
请求过滤模块被配置为拒绝包含双转义序列的请求。
该问题的解决方案是在 web.config 中允许DoubleEscaping,但我如何在 appsettings.json 中做到这一点?我应该在 appsettings 或 Startup.cs 中以某种方式编写此代码:
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true"/>
</security>
</system.webServer>
【问题讨论】:
-
我也遇到了这个问题。 MS 拥有创建包含此类错误的确认令牌的功能是多么令人沮丧。
-
你有没有想过这个问题?
标签: asp.net-core asp.net-core-2.0 appsettings asp.net-core-identity