IIS can't upload file lớn hơn 30Mb
The request filtering module is configured to deny a request that exceeds the request content length
SUMMARY
HTTP Error 404.13 - Not Found
Description: The request filtering module is configured to deny a request that exceeds the request content length.
Error Code: 0x00000000
Notification: BeginRequest
Module: RequestFilteringModule
What you can try:
- Verify the configuration/system.webServer/security/requestFiltering/requestLimits@maxAllowedContentLength setting in the applicationhost.config or web.config file.
More Information... This is a security feature. Do not change this feature unless the scope of the change is fully understood. You can configure the IIS 7.0 server to reject requests whose content length is greater than a specified value. If the request's content length is greater than the configured length, this error is returned. If the content length requires an increase, modify the configuration/system.webServer/security/requestFiltering/requestLimits@maxAllowedContentLength setting.
Solution
Try this:
Trích dẫn:
|
%windir%\system32\inetsrv\appcmd set config -section:requestFiltering -requestLimits.maxAllowedContentLength:1000000
or if you only want to set it for your app:
%windir%\system32\inetsrv\appcmd set config "Default WebSite/<your app>" -section:requestFiltering requestLimits.maxAllowedContentLength:1000000
|
or
Trích dẫn:
|
%windir%\system32\inetsrv\appcmd set config "PleskControlPanel/" -section:requestFiltering -requestLimits.maxAllowedContentLength:104857600
|
or
I got error "The request filtering module is configured to deny a request that exceeds the request content length" at IIS 7.
SUMMARY
This problem occurs because by default in IIS 7 enabled requestFiltering that have
MaxAllowedContentLength property. It specifies, in bytes, the maximum length of content in a request. The default is 30000000 (approximately 30 megabytes.)
SOLUTION
To change this value you must include following code in your Web.config file if you want to apply this setting only to you application. If you want to change this setting for all of the computer and not just this ASP.NET application, you must modify the Machine.config file. By default, the element is set to the following parameters in the Machine.config file: The Machine.config file is located in the \System Root\Microsoft.NET\Framework\Version Number\CONFIG directory.
Trích dẫn:
|
<configuration> <system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="100000000"/> </requestFiltering> </security> </system.webServer> </configuration>
|
If you have error that requestFiltering cannot be overriden you must edit mashine.config file and change string
<section name="requestFiltering" overrideModeDefault="Deny" />
to <section name="requestFiltering" overrideModeDefault="Allow" />
Sưu Tập