Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc IIS 7.5上的maxRequestLength与maxAllowedContentLength_Asp.net Mvc_Iis 7_Web Config_Iis 7.5 - Fatal编程技术网

Asp.net mvc IIS 7.5上的maxRequestLength与maxAllowedContentLength

Asp.net mvc IIS 7.5上的maxRequestLength与maxAllowedContentLength,asp.net-mvc,iis-7,web-config,iis-7.5,Asp.net Mvc,Iis 7,Web Config,Iis 7.5,maxAllowedContentLength应该在IIS 7+服务器上工作,但显然我的服务器在上传时不想考虑这个值(ASP.NET MVC 3网站)。现在,我在web.config中包含了maxRequestLength,一切都开始工作,并应用了该值。然而,每个人都在说maxAllowedContentLength是正确的 有人对这种行为有什么解释吗?看看下面的链接——它解释了两者之间的区别。如果要上载大文件,则需要同时设置这两个选项。请注意,您还可以将此设置嵌套在标记中,以避免将该设置应用于

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


有人对这种行为有什么解释吗?

看看下面的链接——它解释了两者之间的区别。如果要上载大文件,则需要同时设置这两个选项。请注意,您还可以将此设置嵌套在
标记中,以避免将该设置应用于整个网站(我建议这样做)


不确定,但maxRequestLength以kb为单位,maxAllowedContentLength以字节为单位。可能是测试文件问题?请查看类似帖子的答案。[最大长度][1][1]:谢谢克里斯指出这一点