RequestFormLimitsAttribute Class

Definition

Sets the specified limits to the Form.

public ref class RequestFormLimitsAttribute : Attribute, Microsoft::AspNetCore::Mvc::Filters::IFilterFactory, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class RequestFormLimitsAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class RequestFormLimitsAttribute : Attribute, Microsoft.AspNetCore.Http.Metadata.IFormOptionsMetadata, Microsoft.AspNetCore.Mvc.Filters.IFilterFactory, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type RequestFormLimitsAttribute = class
    inherit Attribute
    interface IFilterFactory
    interface IFilterMetadata
    interface IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type RequestFormLimitsAttribute = class
    inherit Attribute
    interface IFilterFactory
    interface IFilterMetadata
    interface IOrderedFilter
    interface IFormOptionsMetadata
Public Class RequestFormLimitsAttribute
Inherits Attribute
Implements IFilterFactory, IOrderedFilter
Public Class RequestFormLimitsAttribute
Inherits Attribute
Implements IFilterFactory, IFormOptionsMetadata, IOrderedFilter
Inheritance
RequestFormLimitsAttribute
Attributes
Implements

Constructors

RequestFormLimitsAttribute()

Properties

BufferBody

Enables full request body buffering. Use this if multiple components need to read the raw stream. The default value is false.

BufferBodyLengthLimit

If BufferBody is enabled, this is the limit for the total number of bytes that will be buffered. Forms that exceed this limit will throw an InvalidDataException when parsed.

IsReusable

Gets a value that indicates if the result of CreateInstance(IServiceProvider) can be reused across requests.

KeyLengthLimit

A limit on the length of individual keys. Forms containing keys that exceed this limit will throw an InvalidDataException when parsed.

MemoryBufferThreshold

If BufferBody is enabled, this many bytes of the body will be buffered in memory. If this threshold is exceeded then the buffer will be moved to a temp file on disk instead. This also applies when buffering individual multipart section bodies.

MultipartBodyLengthLimit

A limit for the length of each multipart body. Forms sections that exceed this limit will throw an InvalidDataException when parsed.

MultipartBoundaryLengthLimit

A limit for the length of the boundary identifier. Forms with boundaries that exceed this limit will throw an InvalidDataException when parsed.

MultipartHeadersCountLimit

A limit for the number of headers to allow in each multipart section. Headers with the same name will be combined. Form sections that exceed this limit will throw an InvalidDataException when parsed.

MultipartHeadersLengthLimit

A limit for the total length of the header keys and values in each multipart section. Form sections that exceed this limit will throw an InvalidDataException when parsed.

Order

Gets the order value for determining the order of execution of filters. Filters execute in ascending numeric value of the Order property.

ValueCountLimit

A limit for the number of form entries to allow. Forms that exceed this limit will throw an InvalidDataException when parsed.

ValueLengthLimit

A limit on the length of individual form values. Forms containing values that exceed this limit will throw an InvalidDataException when parsed.

Methods

CreateInstance(IServiceProvider)

Creates an instance of the executable filter.

Explicit Interface Implementations

IFormOptionsMetadata.BufferBody
IFormOptionsMetadata.BufferBodyLengthLimit
IFormOptionsMetadata.KeyLengthLimit
IFormOptionsMetadata.MemoryBufferThreshold
IFormOptionsMetadata.MultipartBodyLengthLimit
IFormOptionsMetadata.MultipartBoundaryLengthLimit
IFormOptionsMetadata.MultipartHeadersCountLimit
IFormOptionsMetadata.MultipartHeadersLengthLimit
IFormOptionsMetadata.ValueCountLimit
IFormOptionsMetadata.ValueLengthLimit

Applies to