Form submit resulting in “InvalidDataException: Form value count limit 1024 exceeded.”

前端 未结 4 1486
广开言路
广开言路 2020-12-05 17:01

I have created an mvc site and I\'m posting a large amount of json form data (Content-Type:application/x-www-form-urlencoded) back to the mvc controller. When I

4条回答
  •  醉梦人生
    2020-12-05 17:51

    The default formvalue(not formkey) limit is 1024.

    Also, I think you can just change the FormOptions limit in Startup.cs file.

    public void ConfigureServices(IServiceCollection services)
    {
        services.Configure(options =>
        {
            options.ValueCountLimit = int.MaxValue;
        });
    }
    

提交回复
热议问题