.net Core 解决Form value count limit 1024 exceeded. (文件上传过大)

匿名 (未验证) 提交于 2019-12-02 22:06:11

原因:.net core提交的表单限制太小导致页面表单提交失败

[RequestFormLimits(ValueCountLimit = 5000)] public class TestController: Controller
public void ConfigureServices(IServiceCollection services) {     services.Configure<FormOptions>(options =>     {         options.ValueCountLimit = 5000; // 5000 items max         options.ValueLengthLimit = 1024 * 1024 * 100; // 100MB max len form data     });
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!