首页 > 其他分享 >.net core 3.1 上传大文件报错413 Payload Too Large

.net core 3.1 上传大文件报错413 Payload Too Large

时间:2023-03-03 16:55:05浏览次数:56  
标签:core Configure 413 报错 Too 3.1 net options

IIS配置如下

https://www.cnblogs.com/hallejuayahaha/p/12884347.html 

 

代码里面新增

 services.Configure<FormOptions>(options => {
                options.MultipartBodyLengthLimit = 1024 * 1024 * 2000;
                options.MultipartHeadersCountLimit = 100;

            });

            services.Configure<KestrelServerOptions>(options =>
            {
                //Set the limit to 256 MB
                options.Limits.MaxRequestBodySize = 268435456;
            });

  

标签:core,Configure,413,报错,Too,3.1,net,options
From: https://www.cnblogs.com/xiexie0223/p/17176249.html

相关文章