Is there a way to ignore the maxRequestLength limit of 2GB file uploads?(有没有办法忽略 2GB 文件上传的 maxRequestLength 限制?)
问题描述
这里我将 maxRequestLength
设置为 2GB(最大值),这表示 ASP.NET 支持的最大请求大小:
Here's where I'm setting maxRequestLength
to 2GB (the max value), which indicates the maximum request size supported by ASP.NET:
<system.web>
<httpRuntime maxRequestLength="2097151" executionTimeout="3600"/>
...
这里我将 maxAllowedContentLength
设置为 4GB(最大值),它指定了 IIS 支持的请求中内容的最大长度
and here I'm setting the maxAllowedContentLength
to 4GB (the max value), which specifies the maximum length of content in a request supported by IIS
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="4294967295"/>
</requestFiltering>
</security>
...
我希望能够上传最大 4GB 的文件,但我受到 maxRequestLength
字段的限制.
I'd like to be able to upload files up to 4GB, but I'm limited by the maxRequestLength
field.
我注意到这个第三方上传工具 (http://www.element-it.com/onlinehelp/webconfig.html) 有一个 ignoreHttpRuntimeMaxRequestLength
属性,它允许它上传文件最多4GB.
I noticed that this third party upload tool (http://www.element-it.com/onlinehelp/webconfig.html) has a ignoreHttpRuntimeMaxRequestLength
property, which allows it to upload files up to 4GB.
有谁知道我是否可以像其他上传工具一样忽略 maxRequestLength
值?
Does anyone know if I can ignore the maxRequestLength
value like this other upload tool does?
推荐答案
考虑MaxRequestLength 是一个 Int,目前无法解析高于 Int.Max 正确.
Considering the Type of MaxRequestLength is a Int, at the moment there is no way to parse a value higher than Int.Max correctly.
我听说他们可能会增加 IIS8,但微软目前还没有具体的消息.我在 .Net 4.5 中看到的唯一方法是使用 HttpRequest.GetBufferlessInputStream一个>哪个
I heard they might be increasing IIS8 but nothing concrete from Microsoft as of yet. The only way I've seen in .Net 4.5 is to use HttpRequest.GetBufferlessInputStream which
获取可用于读取传入 HTTP 实体正文的 Stream 对象,可选择禁用 MaxRequestLength 属性中设置的请求长度限制.
Gets a Stream object that can be used to read the incoming HTTP entity body, optionally disabling the request-length limit that is set in the MaxRequestLength property.
这篇关于有没有办法忽略 2GB 文件上传的 maxRequestLength 限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:有没有办法忽略 2GB 文件上传的 maxRequestLength 限制?
基础教程推荐
- MS Visual Studio .NET 的替代品 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01