广告:阿里云新人专场
一台客户服务器:IIS中上传文件提示:(413) Request Entity Too Large
但Web.Config中已经设置了文件大小,上传的文件也远小于设置的大小。
最终解决方案:
编辑C:\Windows\System32\inetsrv\config下的applicationHost.config文件,找到自己项目的location项,在system.webServer下添加如下代码:
<serverRuntime uploadReadAheadSize="104857600" />
uploadReadAheadSize单位为(B:bytes),这里104857600 = 100M,实际大小按需求设置。
<location path="EMWeb"> <system.webServer> <serverRuntime uploadReadAheadSize="104857600" /> </system.webServer> </location>
或者临时解决办法:重启服务器或者重启后台即可。
广告:阿里云采购优惠专区