Reputation: 1759
I am running a Service Fabric WebAPI application that makes use of OWIN hosting.
I have run into an issue where we are getting a 400 response: HTTP Error 400. The size of the request headers is too long
Is there any way to increase the supported request header size? The request has a large jwt token in the Authentication header (20kb)? I don' see a property in the HttpConfiguration
properties
Upvotes: 2
Views: 531
Reputation: 1759
Couldn't find a way to do it programatically. Ended up setting reg keys to increase the max header size.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters
MaxRequestBytes
and MaxFieldLength
Upvotes: 1