System.IO.InvalidDataException: Multipart body length limit 16384 exceeded. #26793
-
ProblemI'm not able to upload a 50 mb file. The request is being accepted by Kestrel, but when using the MultipartReader class a threshold error occurs. Analyzing the aspnetcore code the exception occurs due to the limit defined in MultipartReader, and I am defining it as int.MaxValue. I'm using DotNet 5.0.100-rc.1.20452.10 The Code was based on this example: My codePart of the code that occurs the exception, some words are in Portuguese, but the important thing is in English. My Kestrel configurationAspNetCore MultipartReaderStreamStackTrace
HEADERSCache-Control: no-cache |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
That usually means the boundary is wrong so it can't find the start of the first section. There's a non-configurable 16kb limit for how much preamble data it will search looking for the first boundary marker. Can you share the first few lines of the request body? |
Beta Was this translation helpful? Give feedback.
That usually means the boundary is wrong so it can't find the start of the first section. There's a non-configurable 16kb limit for how much preamble data it will search looking for the first boundary marker. Can you share the first few lines of the request body?