Tôi có cả maxRequestLength và maxAllowedContentLength được đặt trong web.config (20MB mỗi) trong một thư mục con (ví dụ: Areas \ Administration \ Views). Tôi có tập tin tải lên trong quản lý và khi tôi cố gắng tải lên một tập tin lớn (~ 9MB trong trường hợp này) tôi nhận được "tối đa yêu cầu vượt quá độ dài". Nếu tôi di chuyển hai thiết lập vào thư mục gốc nó hoạt động nhưng tôi không muốn làm như vậy. Bất kỳ đề xuất?ASP.NET MVC là maxRequestLength và maxAllowedContentLength bị bỏ qua trong một thư mục con web.config?
Công nghệ: ASP.NET, .NET 4.0, MVC 3 và IIS 7 trên Windows Server 2008 Enterprise.
Stack Trace:
[HttpException (0x80004005): Maximum request length exceeded.]
System.Web.HttpRequest.GetEntireRawContent() +11472119
System.Web.HttpRequest.GetMultipartContent() +232
System.Web.HttpRequest.FillInFormCollection() +345
System.Web.HttpRequest.get_Form() +157
Microsoft.Web.Infrastructure.DynamicValidationHelper.<>c__DisplayClass12.<ReplaceCollection>b__e() +63
Microsoft.Web.Infrastructure.DynamicValidationHelper.<>c__DisplayClass12.<ReplaceCollection>b__11() +20
Microsoft.Web.Infrastructure.DynamicValidationHelper.DeferredCountArrayList.get_Count() +20
System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection) +34
System.Web.HttpRequest.get_Form() +212
System.Web.Mvc.HttpRequestExtensions.GetHttpMethodOverride(HttpRequestBase request) +160
System.Web.Mvc.AcceptVerbsAttribute.IsValidForRequest(ControllerContext controllerContext, MethodInfo methodInfo) +55
System.Linq.Enumerable.All(IEnumerable`1 source, Func`2 predicate) +149
System.Web.Mvc.ActionMethodSelector.RunSelectionFilters(ControllerContext controllerContext, List`1 methodInfos) +428
System.Web.Mvc.ReflectedControllerDescriptor.FindAction(ControllerContext controllerContext, String actionName) +140
System.Web.Mvc.ControllerActionInvoker.FindAction(ControllerContext controllerContext, ControllerDescriptor controllerDescriptor, String actionName) +27
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +148
System.Web.Mvc.Controller.ExecuteCore() +159
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +54
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375
Nếu câu trả lời của tôi là giúp bạn, hãy chấp nhận nó như câu trả lời. Nếu không, hãy đăng nhận xét để cho chúng tôi biết thêm thông tin về sự cố của bạn. –