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


we have upgraded Epicor to Kinetic over the weekend, one of important customisation randomly failing.

see below images are the exception we receive. the customisation simply calls ud table and update data. this was fine in epicor but only issue in kinetic.

any pointers to resolve, much appriciated.

Screenshot 2022-11-21 145835

Try clearing the client cache and maybe rebuild or reimport the customization.

1 Like

tried clear client cache / regen data model / re-imported from epicor to kinetic. no luck
the issue is this error occurs randomly. not always consistent

@josecgomez @hkeric.wci any tips to find the root cause i.e server logs etc?

where can we configure Kinetic Rest thresholds etc

This sounds like an HTTP limitation for IIS. Are you passing large amounts of data within the BPM Context? That could be overflowing your request.

If running from the browser, watch the network traffic and query the Request Headers to see if there is anything unusually large.

Mark W.

@Mark_Wonsil yes, large amount of data. please advise on how to change the limit in iis

in the iis we have @Mark_Wonsil

we use kinetic client not the browser version

Content is not passed in the Header. It seems that the http header size is a hard limit of 16K in IIS - smaller for every other web server.

What are we passing? Maybe you can rearchitect this a bit, so it goes in the content area instead? :person_shrugging:

IIS won’t care what browser you’re running: Chrome, FireFox, Edge, or the embedded browser in the classic client (EO.WebBrowser which is Chrome-based).

@Mark_Wonsil but even a small record is failing

basically - it is a custom screen.

  1. user press button which runs baq (screen code).
  2. the baq result are displayed in grid
  3. then the select some records in the grid
  4. press another button which allocates stock (screen code) for each release and prints material queue

the error occurs randomly, no consistancy. are there any thresholds around number of times users call baq?

Run fiddler on the client and inspect what is actually being sent. It’s possible that EO (uses chromium) has bad cookie stores causing the issue. Not sure how one might clear that. I know you can get developer console one way or another from the smart client, just can’t recall how.

1 Like

I don’t think that’s your issue. That’s 4GB of data.

Not really.

Is it possible that you’re not resetting the BPM Context fields and keep adding to it until it’s over 16K? What you’re describing doesn’t sound like it should be that much data. Do what Josh suggests and watch what’s going over the wire to shed some light on what’s happening.

Another option is to create an Epicor function that accepts keys of the records you want to release and print material tags for and do the work there. In Kinetic (and even before really), we want to execute things at the server and not the client. Link that button to a function call passing in the items to act on.

That would be a whop your head mistake lol.

we dont use BPM Context field - baq returns hardly 100 records only with 3 parameters using dynamicquery adapter in the screen customisation.

we see lot of below message in the event viewer

Ice.Common.EpicorServerException: Bad tokenToken has expired
—> System.UnauthorizedAccessException: Bad tokenToken has expired
at Ice.Security.Token.JsonWebToken.Parse(String token, Byte[] keyBytes) in C:_releases\ICE\ICE4.2.100.10\Source\Server\Framework\Epicor.Ice\Security\Token\JsonWebToken.cs:line 195
at Ice.Security.Token.TokenValidator.Validate(String token, WebTokenIdentity& webTokenIdentity) in C:_releases\ICE\ICE4.2.100.10\Source\Server\Framework\Epicor.Ice\Security\Token\TokenValidator.cs:line 36
— End of inner exception stack trace —

I think it might be time for a support ticket.

one of my peer shared this, perhaps related to ASP.NET core 2 relevant?

(11) ASP.NET Core TempData and Error 400 The size of the request headers is too long - YouTube

i do use custom datatable to store data in the screen. but not sending the custom datatable back to epicor db. it is just calculation object.