maxRequestLength 的最大值?

发布于 2024-10-09 03:45:42 字数 77 浏览 0 评论 0原文

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

被你宠の有点坏 2024-10-16 03:45:42

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

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

翻身的咸鱼 2024-10-16 03:45:42

这两个设置适合我上传 1GB mp4 视频。

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

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

<system.web>
    <httpRuntime maxRequestLength="2097152" requestLengthDiskThreshold="2097152" executionTimeout="240"/>
</system.web>
<system.webServer>
    <security>
        <requestFiltering>
            <requestLimits maxAllowedContentLength="2147483648" />
        </requestFiltering>
    </security>
</system.webServer>
征棹 2024-10-16 03:45:42

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

UPDATE

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

As per MSDN the default value is 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 maxAllowedContentLength for 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

匿名。 2024-10-16 03:45:42

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

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

墨离汐 2024-10-16 03:45:42

正确的值如下。 (尝试过)

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

Right value is below. (Tried)

maxRequestLength="2147483647" targetFramework="4.5.2"/>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文