话不多说,直接上解决方法。

 

修改配置文件  applicationHost.config  具体地址在C:\Windows\System32\inetsrv\config

按照下面的节点进行 添加<serverRuntime uploadReadAheadSize="10485760" />  10MB大小

具体节点如下:

<location>
        <system.webServer>
            <serverRuntime uploadReadAheadSize="10485760" />
        </system.webServer>
</location>

  

 

然后在项目的web.config下找到system.webServer节点 按照下面的节点进行添加 

 

 <security>
  <requestFiltering>
  <!--10MB-->
    <requestLimits maxAllowedContentLength="10485760" />
  </requestFiltering>
</security>

  

我是这样解决的,如果有其他的更好的方法欢迎大家一起讨论。

相关文章:

  • 2022-12-23
  • 2021-08-05
  • 2021-04-17
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-06-08
  • 2021-11-16
猜你喜欢
  • 2021-04-10
  • 2022-01-12
  • 2021-06-10
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2022-02-28
相关资源
相似解决方案