Do web.config header size limits override http.sys limits in the registry?

一个人想着一个人 提交于 2021-01-01 04:27:06

问题


I have an ASP.Net 4.0 application using Windows Integrated Authentication on IIS7.5 on Windows 2003.

Some users are reporting errors with this message:

Bad Request - Request Too Long

HTTP Error 400. The size of the request headers is too long.

Others succeed in loading pages but have errors loading other resources and performing AJAX calls.

One of the users experiencing intermittent errors has a Kerberos Authorization header of about 5700 characters. This user is a member of 250 AD groups. My theory is that other HTTP headers (inc cookies) may take the total beyond 8000 characters, which if encoded using UTF16, totals over the default 16KB limit.

This page describes using web.config to configure limits on each HTTP header: http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits/headerlimits

This page describes using registry settings to set limits on HTTP header size and total request size, by default both 16KB: https://support.microsoft.com/en-us/kb/820129

  1. Do the web.config settings override the HTTP.sys registry settings?
  2. If so, is there a web.config setting for the total request size?

回答1:


  1. The registry one takes high priority as the driver is the entry point of packets. It is also a server wide setting for all incoming HTTP packets.

The request filtering setting only takes effect when the packets are forwarded to IIS pipeline. It can be set at multiple levels to achieve fine grained control.

  1. There does not seem to be a setting for that.



回答2:


Have you tried clearing your cookies within your browser?

It could be possible that you have an overly large number of cookies being stored that will be added to any and all requests made within your browser. This can sometimes lead to issues like this. Additionally, you could try running your application within a different browser to see if that affects anything.



来源:https://stackoverflow.com/questions/35749180/do-web-config-header-size-limits-override-http-sys-limits-in-the-registry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!