After the completion of about 40-45 APIs, the size of the authorization token is around 40 kb. And now after login whenever any request is being sent to the server it gives error of "Bad Request, Header too long.
What I have tried:
For Kestrel Server the blow code has been solved the error -
webBuilder.ConfigureKestrel(options =><br />
{<br />
options.Limits.MaxRequestHeadersTotalSize = 1048576;<br />
})
But for IIS Server I haven't got any kind of solution.
I have tried--
1) Increased the RequestLimit from web.config file.
2) Add the MaxFieldLength and MaxRequestBytes in HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/HTTP/Parameters
3) Add the below code in ConfigureServices method
services.Configure(options => { options.AutomaticAuthentication = true; options.ForwardWindowsAuthentication = true; });
and many more tries but not got the final solution.
Please help if anyone can...