虽然我已将 contentlength 的限制设置为 4GB 左右,但最大值如下
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="4294967295">
</requestLimits>
</requestFiltering>
</security>
<httpRuntime targetFramework="4.5" requestValidationMode="2.0"
requestPathInvalidCharacters="" maxRequestLength="5024000" executionTimeout="3600" />
我得到以下错误
HTTP 错误 400.0 - 错误请求
ASP.NET 在 URL 中检测到无效字符。
我找到了一个链接,其中提到了这种行为的原因
如果应用程序在 NET 4.5 集成管道下运行,则上传将无法在 2G 以上进行,并且 IIS 将发送以下错误:“HTTP 400.0 – 错误请求 ASP.NET 检测到 URL 中的无效字符。”。
当使用集成管道时,我们会通过不支持超过 2 GB 内容长度的 webengine 代码 (webengine4!MgdGetRequestBasics) 并引发 System.ArithmeticException 异常,随后导致 HTTP 400 错误。使用经典管道,我们不使用 webengine4,而是使用旧的 ASPNET_ISAPI 模型,我们没有遇到上述问题。
想问一下这在 IIS 10 和 .net framework 4.5 中是否仍然有效。
有没有可以设置的设置来解决这个问题?