当前位置:首页 > Multipart body length limit 134217728 exceeded

Multipart body length limit 134217728 exceeded

点击次数:5200  更新日期:2019-12-19

.net post大文件时,报错 

Multipart body length limit 134217728 exceeded

解决方法为Startup.cs中添加

//解决Multipart body length limit 134217728 exceeded
services.Configure<FormOptions>(x =>
{
    x.ValueLengthLimit = int.MaxValue;
    x.MultipartBodyLengthLimit = int.MaxValue; // In case of multipart
});