5

I am having some issues when uploaded files of greater than 4MB to blob storage using an MVC application that I am working on. I have added the necessary code in the web.config as shown below:

Within system.web

<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />

Within system.webserver

<security>
  <requestFiltering>
    <requestLimits maxAllowedContentLength="1073741824" />
  </requestFiltering>
</security>

I have rebuilt my web project and my azure project but I am still getting the maximum request length exceeded error. Any ideas what might be causing this? Stack trace is as follows:

[HttpException (0x80004005): Maximum request length exceeded.] System.Web.HttpRequest.GetEntireRawContent() +12603644 System.Web.HttpRequest.GetMultipartContent() +221 System.Web.HttpRequest.FillInFormCollection() +357 System.Web.HttpRequest.EnsureForm() +110 System.Web.HttpRequest.get_Form() +16 System.IdentityModel.Services.WSFederationAuthenticationModule.IsSignInResponse(HttpRequestBase request) +32 System.IdentityModel.Services.WSFederationAuthenticationModule.CanReadSignInResponse(HttpRequestBase request, Boolean onPage) +129 System.IdentityModel.Services.WSFederationAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args) +152 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165

4

1 回答 1

6

我有类似的问题,问题很愚蠢

在我的 web.config 中已经有一个带有指定 targetFramework 属性的 httpRuntime 标记。

我创建了第二个 httpRuntime 标记,而不是在已经存在的 httpRuntime 标记中添加 maxRequestLength。所以我的价值被忽略了。

于 2014-05-05T16:02:10.630 回答