Dela via


FormOptions Class

Definition

Options to configure reading the request body as a HTTP form.

public ref class FormOptions
public class FormOptions
type FormOptions = class
Public Class FormOptions
Inheritance
FormOptions

Constructors

FormOptions()

Fields

DefaultBufferBodyLengthLimit

Default value for BufferBodyLengthLimit. Defaults to 134,217,728 bytes, which is 128MB.

DefaultMemoryBufferThreshold

Default value for MemoryBufferThreshold. Defaults to 65,536 bytes, which is approximately 64KB.

DefaultMultipartBodyLengthLimit

Default value for MultipartBodyLengthLimit. Defaults to 134,217,728 bytes, which is approximately 128MB.

DefaultMultipartBoundaryLengthLimit

Default value for MultipartBoundaryLengthLimit. Defaults to 128 bytes.

Properties

BufferBody

Enables full request body buffering. Use this if multiple components need to read the raw stream. Defaults to 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. Defaults to 134,217,728 bytes, which is approximately 128MB.

KeyLengthLimit

A limit on the length of individual keys. Forms containing keys that exceed this limit will throw an InvalidDataException when parsed. Defaults to 2,048 bytes, which is approximately 2KB.

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. Defaults to 65,536 bytes, which is approximately 64KB.

MultipartBodyLengthLimit

A limit for the length of each multipart body. Forms sections that exceed this limit will throw an InvalidDataException when parsed. Defaults to 134,217,728 bytes, which is approximately 128MB.

MultipartBoundaryLengthLimit

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

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. Defaults to 16.

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. Defaults to 16,384 bytes, which is approximately 16KB.

ValueCountLimit

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

ValueLengthLimit

A limit on the length of individual form values. Forms containing values that exceed this limit will throw an InvalidDataException when parsed. Defaults to 4,194,304 bytes, which is approximately 4MB.

Applies to