【发布时间】:2016-04-07 15:35:07
【问题描述】:
我提供了一项托管在 azure webapp 上的服务。这将用于上传文件。 IIS 具有限制文件上传大小的内置安全功能。
为了解决这个问题,我在 web.config 中添加了以下内容
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="80000000" />
</requestFiltering>
</security>
</system.webServer>
...
<system.web>
<httpRuntime maxRequestLength="80000" targetFramework="4.5.2" executionTimeout="9000" />
</system.web>
但这对我不起作用。一旦我上传了一个大文件(例如 50mb),它就会给我一个 404。当我上传一个较小的文件(10mb)时,它工作正常。该服务是一个肥皂,并通过 https 调用。调用没有超时,异常发生在调用的 5 秒内,我猜它上传了 30mb,然后它认为它受到攻击并中止。
我错过了什么吗?
【问题讨论】:
标签: asp.net azure iis web-applications web-config