Skip to content

KeyLengthLimit does not support int.MaxValue in Preview 9 #13719

@rybkov

Description

@rybkov

Describe the bug

After update to Preview 9 cannot submit form if KeyLengthLimit set to int.MaxValue

To Reproduce

  1. Using this version of ASP.NET Core '3.0.0-preview9.19424.4'
  2. Create Default MVC application
  3. Create form
  4. In services setup
    Services.Configure<FormOptions>( Options => Options.ValueLengthLimit = int.MaxValue ); Services.Configure<FormOptions>( Options => Options.ValueCountLimit = int.MaxValue ); Services.Configure<FormOptions>( Options => Options.KeyLengthLimit = int.MaxValue );
  5. Submit a form
  6. See error Form key length limit 2147483647 or value length limit 2147483647 exceeded.

Workaround

Setup values to 1_009_100_000 (they might be bigger, but 1_090_000_000 does not work already)

Expected behavior

Preview 8 did not have that issues

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.feature-http-abstractions

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions