We are receiving this error from the website on server when we try to log in. We suspect it's because of the cookies size but the problem is the server started to respond this way out of the blue without making any changes on the code.
We even tried reverting to a previous working version and checked the pipelines, none of the solution worked. We tried increasing the iis header size request limits etc.
The permissions and authorizations for users are being sent in the cookies as objects and string that includes controller name and all of its view models and entities, that's why it's big. The solution is being rebuilt and refactored and expected to finish in a month but we need a stop-gap solution for the existing problem.

We tried:
- increasing header, maximum request - size limits on iis.
- decreasing the cookies size but on iis it didn't decrease
- logging-in with a minimum authorization user also it didn't work
In IIS, you can increase the maximum allowed size for headers by adjusting the server's configuration. Follow these steps:
Open the IIS Manager. Select your site. In the Features View, double-click on "Configuration Editor." In the Section drop-down list, select system.webServer/ServerRuntime. Increase the value of headerLimits (specifically maxRequestHeaderFieldSize and maxRequestHeaderValueSize).