当我试图在我的网站上上传视频时,我得到错误的最大请求长度超过了。
我怎么解决这个问题?
当我试图在我的网站上上传视频时,我得到错误的最大请求长度超过了。
我怎么解决这个问题?
当前回答
我被我们的网绊倒了。配置文件有多个系统。web部分:当我添加< httpRuntime maxRequestLength="1048576" />到系统时,它工作了。Web部分的配置级别。
其他回答
我认为这里没有提到它,但为了让它工作,我必须在web.config中提供这两个值:
在包含
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
在system。webserver中
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
重要提示:这两个值必须匹配。在这种情况下,我的最大上传是1024兆字节。
maxAllowedContentLength有1073741824字节。
我知道这很明显,但很容易被忽视。
这也困扰了我好几天。 我修改了网页。配置文件,但它没有工作。 原来有两个Web。配置文件在我的项目, 我应该修改ROOT目录下的那个,而不是其他的。 希望这对你有所帮助。
在web中有一个元素。配置上传文件的最大大小:
<httpRuntime
maxRequestLength="1048576"
/>
我正在处理同样的错误,花时间解决后,添加以下行在web。配置文件
<system.web>
<httpRuntime targetFramework="4.7.1" maxRequestLength="1048576"/>
</system.web>
and
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
我可以添加到config web uncompiled
<system.web>
<httpRuntime maxRequestLength="1024" executionTimeout="3600" />
<compilation debug="true"/>
</system.web>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1048576"/>
</requestFiltering>
</security>