如何在IIS7运行时maxAllowedContentLength设置为500MB? [英] How to set the maxAllowedContentLength to 500MB while running on IIS7?

查看:1974
本文介绍了如何在IIS7运行时maxAllowedContentLength设置为500MB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我改变了maxAllowedContentLength到

I changed the maxAllowedContentLength to

<security>
    <requestFiltering>
        <requestLimits maxAllowedContentLength="5024000000" />
    </requestFiltering>
</security>

在我的web.config,但是在IIS7运行时,我得到这个错误:

In my web.config, but when running on IIS7 I get this error:

在'maxAllowedContentLength属性无效。没有一个有效的无符号整数

The 'maxAllowedContentLength' attribute is invalid. Not a valid unsigned integer

但是当我在VS服务器运行正常运行,没有任何错误。

but when I run in the VS server it run normally without any errors.

如何配置我的网站,让有500MB大小上传文件,如果没有这个问题上IIS7?

How to config my website to allow upload files with 500MB size, without this problem on IIS7?

推荐答案

据的 MSDN maxAllowedContentLength 的类型 UINT ,它的最大值是4,294,967,295字节= 3,99 GB

According to MSDN maxAllowedContentLength has type uint, its maximum value is 4,294,967,295 bytes = 3,99 gb

因此​​,它应该工作的罚款。

So it should work fine.

另请参见<一个href="http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits">Request限制文章。 IIS是否返回这些错误之一时,相应的部分没有在所有配置的?

See also Request Limits article. Does IIS return one of these errors when the appropriate section is not configured at all?

这篇关于如何在IIS7运行时maxAllowedContentLength设置为500MB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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