有没有办法忽略2GB的文件上传的maxRequestLength限制? [英] Is there a way to ignore the maxRequestLength limit of 2GB file uploads?

查看:374
本文介绍了有没有办法忽略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 字段限制。

我注意到,这个第三方上传工具(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?

推荐答案

考虑的<一个类型href=\"http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.maxrequestlength.aspx\">MaxRequestLength是诠释,此刻也没有办法解析比 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中看到的唯一方法是使用<一个href=\"http://msdn.microsoft.com/en-us/library/hh195568.aspx\">Htt$p$pquest.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限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆