Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.4K
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda