C# WebApi Post上传文件大小限制

版权声明:全部文章版权归我所有。转载除外。 https://blog.csdn.net/kesshei/article/details/83892719

需要修改两个地方  

一般都在  web.config里

<configuration>
  <system.web>
    <httpRuntime maxRequestLength="102400" executionTimeout="200" enable="true" />
  </system.web>
  <system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="104857600" />
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>

需要修改这两个文件 

第一个文件的单位是 kb  也就是100M

第二个文件的单位是 byte  也是100M

猜你喜欢

转载自blog.csdn.net/kesshei/article/details/83892719