.net maxRequestLength 的最大值?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4548305/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 15:04:34  来源:igfitidea点击:

Maximum value of maxRequestLength?

.netiis-7.net-4.0maxrequestlength

提问by Erkan BALABAN

If we are using IIS 7 and .Net Framework 4, what will be the maximum value of maxRequestLength?

如果我们使用 IIS 7 和 .Net Framework 4,那么最大值是maxRequestLength多少?

采纳答案by Waleed Al-Balooshi

As per MSDNthe default value is 4096 KB (4 MB).

根据MSDN,默认值为 4096 KB (4 MB)。

UPDATE

更新

As for the Maximum, since it is an int data type, then theoretically you can go up to 2,147,483,647. Also I wanted to make sure that you are aware that IIS 7 uses maxAllowedContentLengthfor specifying file upload size. By default it is set to 30000000 around 30MB and being an uint, it should theoretically allow a max of 4,294,967,295

至于Maximum,既然是int数据类型,那么理论上可以达到2,147,483,647。另外我想确保您知道 IIS 7 使用maxAllowedContentLength来指定文件上传大小。默认情况下,它设置为 30000000 大约 30MB 并且是一个 uint,理论上它应该允许最大值为 4,294,967,295

回答by Petr

Maximum is 2097151, If you try set more error occurred.

最大值为 2097151,如果您尝试设置更多,则会发生错误。

回答by JJ_Coder4Hire

These two settings worked for me to upload 1GB mp4 videos.

这两个设置对我上传 1GB mp4 视频很有用。

<system.web>
    <httpRuntime maxRequestLength="2097152" requestLengthDiskThreshold="2097152" executionTimeout="240"/>
</system.web>
<system.webServer>
    <security>
        <requestFiltering>
            <requestLimits maxAllowedContentLength="2147483648" />
        </requestFiltering>
    </security>
</system.webServer>

回答by Mark

2,147,483,647 bytes, since the value is a signed integer (Int32). That's probably more than you'll need.

2,147,483,647 字节,因为该值是有符号整数 (Int32)。这可能比你需要的更多。

回答by ?zgün Seyhan Temel

Right value is below. (Tried)

正确值如下。(试过)

maxRequestLength="2147483647" targetFramework="4.5.2"/>