maxRequestLength vs. maxAllowedContentLength on IIS 7.5

∥☆過路亽.° 提交于 2019-12-07 00:11:07

问题


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?


回答1:


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).

Confusing required maxRequestLength and maxAllowedContentLength settings



来源:https://stackoverflow.com/questions/11300232/maxrequestlength-vs-maxallowedcontentlength-on-iis-7-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!