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

The values of MaxFieldLength and MaxRequestBytes also need to be set in the registry under the key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters as DWORD values.

For more details with screenshots see the article
HTTP 400 - Bad Request (Request Header too long).