IIS 7.5上的maxRequestLength与maxAllowedContentLength [英] maxRequestLength vs. maxAllowedContentLength on IIS 7.5

查看:494
本文介绍了IIS 7.5上的maxRequestLength与maxAllowedContentLength的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

maxAllowedContentLength应该可以在IIS 7+服务器上运行,但显然我的服务器不希望在上传时考虑这个值(ASP.NET MVC 3网站)。现在我在web.config中包含了maxRequestLength,一切都开始工作,并且应用了值。然而,每个人都说maxAllowedContentLength是正确的。

maxAllowedContentLength is supposed to work on IIS 7+ servers but apparently my server doesn't want to take this value into account when uploading (ASP.NET MVC 3 website). Now that I included maxRequestLength in web.config everything started to work and the value was applied. Yet everywhere everyone is saying that the maxAllowedContentLength is the right one.

有没有人对这种行为有解释?

Does anyone has an explanation for this behaviour?

推荐答案

看看下面的链接 - 它解释了两者之间的区别。如果要上传大文件,则需要设置两者。请注意,您还可以将此设置嵌套在< location> 标记中,以便不将该设置应用于整个网站(我推荐)。

Take a look at the link below - it explains the difference between the two. You'll need to set both if you are going to be uploading large files. Note that you can also nest this setting in a <location> tag so as not to apply the setting to the entire website (which I recommend).

混淆所需的maxRequestLength和maxAllowedContentLength设置

这篇关于IIS 7.5上的maxRequestLength与maxAllowedContentLength的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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