Hi Thinh!
I have looked up the details of the error. It seems the limit does not apply to the whole request but to every single HTTP header. All cookies come in a single header, so a few "longer" cookies can cause the error.
Here are some relevant links to the MS Knowledge Base:
In my case, the cookies and their lengths were:
SamlSession 419
MSISSignOut 83
MSISAuthenticated 49
MSISLoopDetectionCookie 54
MSISSamlRequest 2019
MSISSamlRequest1 2020
MSISSamlRequest2 1645
MSISContext59e5cee1-c83d-4f55-ae1c-8af4c8b2440a 2051
MSISContext59e5cee1-c83d-4f55-ae1c-8af4c8b2440a1 2052
MSISContext59e5cee1-c83d-4f55-ae1c-8af4c8b2440a2 1732
MSISTtpDataReceivedCookie 85
MSISIPSelectionSession 78
MSISContext3febe5ed-4f86-40f5-ab7b-3cc1d0351755 2051
MSISContext3febe5ed-4f86-40f5-ab7b-3cc1d03517551 2052
MSISContext3febe5ed-4f86-40f5-ab7b-3cc1d03517552 1732
ASP.NET_SessionId 45
.VISFedAuth 495
.VISFedAuthBasic 500
SMSESSION 1209
LtpaToken2 846
LtpaToken 421
Here you can see that either IIS or ADFS creates several copies of the same cookie (already quite long) which causes the limit to be exceeded.
ADFS uses a few redirects during authentication, so even if the original request from your application does not have these cookies, they can appear after the first redirect. Unfortunately I have no idea if this behavior can be somehow controlled or not.
Please examine your users' requests if such cookies are present there or not.
Best Regards,
Jarda
Dne sobota 9. července 2016 1:32:20 UTC+2 Thinh Nguyen napsal(a):