C# Web API Modify Post Data Size Limit

在Web.config中增加下面两个配置后,重启IIS即可。

 

1.修改http请求数据大小限制

<system.web>
  <httpRuntime maxRequestLength="50000000" />
</system.web>

 

2.如果数据序列化格式为Json,请增加:

<system.web.extensions>
    <scripting>
      <webServices>
        <jsonSerialization maxJsonLength="500000000"/>
      </webServices>
    </scripting>
 </system.web.extensions>
posted @ 2017-05-20 10:44  凌晨三点半  阅读(1306)  评论(0编辑  收藏  举报