Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.4K
Views
ASP.NET Core 'Multipart body length limit 16384 exceeded' error

I am using ASP.NET Core 1.1. and I am trying to upload files using JQuery AJAX but I keep getting the error: "Multipart body length limit 16384 exceeded"

Reseach told me to add this to my Startup.js file:

public void ConfigureServices(IServiceCollection services)
{
    services.AddMvc();

    services.Configure<FormOptions>(Option =>
    {
        Option.MultipartBodyLengthLimit = 200000000;
    });
}

But I still keep getting the error at

foreach (File file in Request.Form.Files)

I see that that the MultipartBodyLengthLimit is updated at startup but it doesn't seem to hold the updated value somehow when the app runs.

Does this even work in ASP.NET Core or do I need to use another way to upload files using jQuery in ASP.NET Core?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!