【发布时间】:2019-07-11 11:23:54
【问题描述】:
登录到我们管理门户的用户通过 Active Directory 获得权限。他们越来越多地遇到 400 错误 Bad Request (Request Header too long) 错误。
这是由 Microsoft 记录的: https://support.microsoft.com/en-us/help/2020943/http-400-bad-request-request-header-too-long-response-to-http-request
他们提出的解决方案是添加两个注册表项 - MaxFieldLength 和 MaxRequestBytes - 控制 URL 中允许的数据量。
但是,我们的网站在 Azure 中设置为 Web 应用程序。根据各种来源,包括这个 SO 问题 - How to Create an HKLM entry in Azure Website - 您无法更改 Web 应用程序上的注册表。
有没有办法解决这个问题?有趣的是,MS 建议的另一个解决方案是“减少用户所属的 Active Directory 组的数量”。但是我们已经把它降到了两个,但问题仍然存在。 URL 的最大组成部分是 QueryString 中的“状态”参数。
【问题讨论】:
标签: c# azure iis asp.net-core-2.0 query-string