maxRequestLength与IIS 7.5上的maxAllowedContentLength
问题描述:
maxAllowedContentLength应该可以在IIS 7+服务器上工作,但显然我的服务器在上传时不想考虑这个值(ASP.NET MVC 3网站)。现在我在web.config中包含了maxRequestLength,所有的东西都开始工作,并且这个值已经被应用了。然而,每个人都在说maxAllowedContentLength是正确的。maxRequestLength与IIS 7.5上的maxAllowedContentLength
有没有人对此行为有过解释?
答
看看下面的链接 - 它解释了两者之间的区别。如果您要上传大文件,则需要设置两者。请注意,您也可以将此设置嵌套在<location>
标记中,以免将设置应用于整个网站(我建议)。
Confusing required maxRequestLength and maxAllowedContentLength settings
不知道,但,maxRequestLength的是kb和maxAllowedContentLength是以字节为单位。也许测试文件的问题? – dotjoe
看看这个答案的类似帖子。 [最大长度] [1] [1]:http://stackoverflow.com/questions/6327452/which-gets-priority-maxrequestlength-or-maxallowedcontentlength –
感谢克里斯指出这出 – mare