Hi,
I have a virtual application in IIS 8.
The site has a file picker to upload files to the server (in our case the the files are uploaded to NAS drive). If the file to upload is heavy, I receive the following message:
---
Server Error in '/' Application.
Maximum request length exceeded.
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Maximum request length exceeded.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[HttpException (0x80004005): Maximum request length exceeded.] System.Web.HttpRequest.GetEntireRawContent() +12604736 System.Web.HttpRequest.GetMultipartContent() +221 System.Web.HttpRequest.FillInFormCollection() +357 System.Web.HttpRequest.EnsureForm() +110 System.Web.HttpRequest.get_HasForm() +12607123 System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +146 System.Web.UI.Page.DeterminePostBackMode() +129 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +322 |
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
---
To solve this I have read a lot of posts, and I have made the following changes in the web.config of my site:
Add this entry in <system.web>
<httpRuntimemaxRequestLength="524288"executionTimeout="120000"/>
And another one in <system.webserver>
<security><requestFiltering><requestLimitsmaxAllowedContentLength="524288000"/></requestFiltering></security>
Other tasks, in this case using appcmd.exe
C:\Windows\System32\inetsrv>appcmd set config "Site" -section:requestF iltering -requestLimits.maxAllowedContentLength:524288000
Even with this tasks done, I am still receiving the above error message.
In the EventViewer the ID is: 1309, Event code: 3004, Event message: Post size exceeded allowed limits.
Some idea? Thanks!