Я пытаюсь загрузить файл размером 20 мегабайт с помощью элемента управления загрузкой, и он отлично работает на встроенном веб-сервере Visual Studio, но как только я публикую его на рабочем сервере (к которому у меня нет доступа), я получаю следующую ошибку :
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() +11140903
System.Web.HttpRequest.GetMultipartContent() +72
System.Web.HttpRequest.FillInFormCollection() +245
System.Web.HttpRequest.get_Form() +119
System.Web.HttpRequest.get_HasForm() +11072199
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +124
System.Web.UI.Page.DeterminePostBackMode() +83
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +270
--------------------------------------------------------------------------------
Я добавил следующее к своему узлу system.web, так что я не знаю, какова реальная проблема.
<httpRuntime executionTimeout="800" maxRequestLength="51200" />
Любое направление по этому вопросу было бы очень полезно.