Bad Request - Request Too Long HTTP Error 400. The size of the request headers is too long

It seems that there were too many cookies after all. I made sure that there were not so many and it is working now.


Some of our users also ran into this same exception on IE 8 for some our our intranet sites hosted in IIS. The issue turned out to be related to using Kerberos authentication where a user belongs to many active directory groups.

We found solutions from the following Microsoft Support Articles:

  • HTTP 400 - Bad Request (Request Header too long)" error in Internet Information Services (IIS)
  • Problems with Kerberos authentication when a user belongs to many groups

The fix for us was to set the following registry keys with increased values and/or create them if they didn't exist:

  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters\MaxFieldLength DWORD (32bit) - assigned value data 32000 (Decimal)
  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters\MaxRequestBytes DWORD (32bit) - assigned value data 8777216 (Decimal)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters] "MaxFieldLength"=dword:00007d00 "MaxRequestBytes"=dword:0085ee00


Solution 1

delete all domain cookie from your browser

In Firefox 53

  1. Alt -> Tools -> Page Info
  2. Security
  3. View Cookies
  4. Remove All

enter image description here

In Chrome check this superuser solution enter image description here

Solution 2

  1. Install Web Developer extension ( Firefox ,Chrome , Opera)
  2. go to cookies tab -> Delete Domain Cookies like below screenshot

enter image description here

Solution 3

  • use incognito mode and see if it works for you

More details:

I had the same problem in Chrome and using a list from SharePoint.

after diagnosing with Chrome developer dashboard's network tab. I checked the headers and find the large cookie starting with the name WSS_exp and removing all of them from chrome cookie manager resolved my problem