超过最大请求长度 [英] Maximum request length exceeded
问题描述
我收到的时候我想在我的网站上传视频此错误。
I am getting this error when I am trying to upload a video in my site.
你能告诉我怎么解决这个问题?
Can you tell me how to fix this?
推荐答案
如果您使用的是IIS托管应用程序,则默认上传文件的大小如果为4MB。为了增加它,请在你的web.config使用一节 -
If you are using IIS for hosting your application, then the default upload file size if 4MB. To increase it, please use this below section in your web.config -
<configuration>
<system.web>
<httpRuntime maxRequestLength="1048576" />
</system.web>
</configuration>
有关IIS7及以上的,你还需要添加下面的几行:
For IIS7 and above, you also need to add the lines below:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
请注意: maxAllowedContentLength
是以字节为单位,而的maxRequestLength
以KB为单位,这也是为什么值不同此配置的例子。 (两者都是相当于1 GB)。
Note: maxAllowedContentLength
is measured in bytes while maxRequestLength
is measured in kilobytes, which is why the values differ in this config example. (Both are equivalent to 1 GB.)
这篇关于超过最大请求长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!