I'm getting an exception when submitting an array of more than 1024 items to a controller (currently 2,500 items). It seems there is a max limit on the number of items you can submit of 1024.
It seems to be set in MvcOptions, however I'm using .Net Core 3.0 and using endpoint routing, so I don't have access to MvcOptions through UseMVC.
How can I raise this limit?
I've raised limits before by adding a helper attribute, as follows. However I'm not sure where I would need to set this particular limit - it doesnt appear to be part of HttpContext.Features.
public void OnAuthorization(AuthorizationFilterContext context)
{
var features = context.HttpContext.Features;
var formFeature = features.Get<IFormFeature>();
if (formFeature == null || formFeature.Form == null)
{
features.Set<IFormFeature>(new FormFeature(context.HttpContext.Request, _formOptions));
}
}