Asp .Net Core 5.0
Failed to read the request form. Request body too large.
参照 https://www.cnblogs.com/zhang-wenbin/p/10412442.html
修改Startup.cs
文件
public void ConfigureServices(IServiceCollection services) { services.AddControllers(); services.Configure<FormOptions>(x => { x.ValueLengthLimit = int.MaxValue; x.MultipartBodyLengthLimit = int.MaxValue; x.MemoryBufferThreshold = int.MaxValue; }); services.Configure<KestrelServerOptions>(options => { options.Limits.MaxRequestBodySize = 1024 * 1024 * 1024; }); }