mccalltd/AttributeRouting — Issue #49: AR Bug. Posted the Stack Trace.
Author: shapper
Created: 2012-02-20 15:50:09+00:00
State: open

Hello,

On a project where I use Attribute Routing I have the following action:

[POST("Files"), Authorize(Roles = "Master"), ValidateAntiForgeryToken]
public virtual ActionResult Create(FileNewModel model) {
}

When I submit an Image with 80 KB everything works fine.
But when I submit a Video with 6 MB I get the following error:

"Maximum request length exceeded"

STACK TRACE:

at System.Web.HttpRequest.GetEntireRawContent()
at System.Web.HttpRequest.GetMultipartContent()
at System.Web.HttpRequest.FillInFormCollection()
at System.Web.HttpRequest.get_Form()
at System.Web.HttpRequestWrapper.get_Form()
at AttributeRouting.Helpers.HttpRequestBaseExtensions.GetFormValue(HttpRequestBase request, String key) in C:\Development\AttributeRouting\src\AttributeRouting\Helpers\HttpRequestBaseExtensions.cs:line 13
at lambda_method(Closure , HttpRequestBase )
at AttributeRouting.Helpers.ObjectExtensions.SafeGet[T,TResult](T obj, Expression`1 memberExpression, TResult defaultValue) in C:\Development\AttributeRouting\src\AttributeRouting\Helpers\ObjectExtensions.cs:line 17
at AttributeRouting.Helpers.ObjectExtensions.SafeGet[T,TResult](T obj, Expression`1 memberExpression) in C:\Development\AttributeRouting\src\AttributeRouting\Helpers\ObjectExtensions.cs:line 10
at AttributeRouting.Helpers.MvcExtensions.GetHttpMethod(HttpRequestBase request) in C:\Development\AttributeRouting\src\AttributeRouting\Helpers\MvcExtensions.cs:line 16
at AttributeRouting.RestfulHttpMethodConstraint.Match(HttpContextBase httpContext, Route route, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) in C:\Development\AttributeRouting\src\AttributeRouting\RestfulHttpMethodConstraint.cs:line 26
at System.Web.Routing.HttpMethodConstraint.System.Web.Routing.IRouteConstraint.Match(HttpContextBase httpContext, Route route, String parameterName, RouteValueDictionary values, RouteDirection routeDirection)
at System.Web.Routing.Route.ProcessConstraint(HttpContextBase httpContext, Object constraint, String parameterName, RouteValueDictionary values, RouteDirection routeDirection)
at System.Web.Routing.Route.ProcessConstraints(HttpContextBase httpContext, RouteValueDictionary values, RouteDirection routeDirection)
at System.Web.Routing.Route.GetRouteData(HttpContextBase httpContext)
at AttributeRouting.Framework.AttributeRoute.GetRouteData(HttpContextBase httpContext) in C:\Development\AttributeRouting\src\AttributeRouting\Framework\AttributeRoute.cs:line 61
at System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext)
at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context)
at System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Any idea? This seems to be a bug.

Thank You,
Miguel