Dela via


HttpRequestRewindExtensions.EnableBuffering Method

Definition

Overloads

EnableBuffering(HttpRequest)

Ensure the requestBody can be read multiple times. Normally buffers request bodies in memory; writes requests larger than 30K bytes to disk.

EnableBuffering(HttpRequest, Int32)

Ensure the requestBody can be read multiple times. Normally buffers request bodies in memory; writes requests larger than bufferThreshold bytes to disk.

EnableBuffering(HttpRequest, Int64)

Ensure the requestBody can be read multiple times. Normally buffers request bodies in memory; writes requests larger than 30K bytes to disk.

EnableBuffering(HttpRequest, Int32, Int64)

Ensure the requestBody can be read multiple times. Normally buffers request bodies in memory; writes requests larger than bufferThreshold bytes to disk.

EnableBuffering(HttpRequest)

Source:
HttpRequestRewindExtensions.cs
Source:
HttpRequestRewindExtensions.cs
Source:
HttpRequestRewindExtensions.cs

Ensure the requestBody can be read multiple times. Normally buffers request bodies in memory; writes requests larger than 30K bytes to disk.

public:
[System::Runtime::CompilerServices::Extension]
 static void EnableBuffering(Microsoft::AspNetCore::Http::HttpRequest ^ request);
public static void EnableBuffering (this Microsoft.AspNetCore.Http.HttpRequest request);
static member EnableBuffering : Microsoft.AspNetCore.Http.HttpRequest -> unit
<Extension()>
Public Sub EnableBuffering (request As HttpRequest)

Parameters

request
HttpRequest

The HttpRequest to prepare.

Remarks

Temporary files for larger requests are written to the location named in the ASPNETCORE_TEMP environment variable, if any. If that environment variable is not defined, these files are written to the current user's temporary folder. Files are automatically deleted at the end of their associated requests.

Applies to

EnableBuffering(HttpRequest, Int32)

Source:
HttpRequestRewindExtensions.cs
Source:
HttpRequestRewindExtensions.cs
Source:
HttpRequestRewindExtensions.cs

Ensure the requestBody can be read multiple times. Normally buffers request bodies in memory; writes requests larger than bufferThreshold bytes to disk.

public:
[System::Runtime::CompilerServices::Extension]
 static void EnableBuffering(Microsoft::AspNetCore::Http::HttpRequest ^ request, int bufferThreshold);
public static void EnableBuffering (this Microsoft.AspNetCore.Http.HttpRequest request, int bufferThreshold);
static member EnableBuffering : Microsoft.AspNetCore.Http.HttpRequest * int -> unit
<Extension()>
Public Sub EnableBuffering (request As HttpRequest, bufferThreshold As Integer)

Parameters

request
HttpRequest

The HttpRequest to prepare.

bufferThreshold
Int32

The maximum size in bytes of the in-memory ArrayPool<T> used to buffer the stream. Larger request bodies are written to disk.

Remarks

Temporary files for larger requests are written to the location named in the ASPNETCORE_TEMP environment variable, if any. If that environment variable is not defined, these files are written to the current user's temporary folder. Files are automatically deleted at the end of their associated requests.

Applies to

EnableBuffering(HttpRequest, Int64)

Source:
HttpRequestRewindExtensions.cs
Source:
HttpRequestRewindExtensions.cs
Source:
HttpRequestRewindExtensions.cs

Ensure the requestBody can be read multiple times. Normally buffers request bodies in memory; writes requests larger than 30K bytes to disk.

public:
[System::Runtime::CompilerServices::Extension]
 static void EnableBuffering(Microsoft::AspNetCore::Http::HttpRequest ^ request, long bufferLimit);
public static void EnableBuffering (this Microsoft.AspNetCore.Http.HttpRequest request, long bufferLimit);
static member EnableBuffering : Microsoft.AspNetCore.Http.HttpRequest * int64 -> unit
<Extension()>
Public Sub EnableBuffering (request As HttpRequest, bufferLimit As Long)

Parameters

request
HttpRequest

The HttpRequest to prepare.

bufferLimit
Int64

The maximum size in bytes of the request body. An attempt to read beyond this limit will cause an IOException.

Remarks

Temporary files for larger requests are written to the location named in the ASPNETCORE_TEMP environment variable, if any. If that environment variable is not defined, these files are written to the current user's temporary folder. Files are automatically deleted at the end of their associated requests.

Applies to

EnableBuffering(HttpRequest, Int32, Int64)

Source:
HttpRequestRewindExtensions.cs
Source:
HttpRequestRewindExtensions.cs
Source:
HttpRequestRewindExtensions.cs

Ensure the requestBody can be read multiple times. Normally buffers request bodies in memory; writes requests larger than bufferThreshold bytes to disk.

public:
[System::Runtime::CompilerServices::Extension]
 static void EnableBuffering(Microsoft::AspNetCore::Http::HttpRequest ^ request, int bufferThreshold, long bufferLimit);
public static void EnableBuffering (this Microsoft.AspNetCore.Http.HttpRequest request, int bufferThreshold, long bufferLimit);
static member EnableBuffering : Microsoft.AspNetCore.Http.HttpRequest * int * int64 -> unit
<Extension()>
Public Sub EnableBuffering (request As HttpRequest, bufferThreshold As Integer, bufferLimit As Long)

Parameters

request
HttpRequest

The HttpRequest to prepare.

bufferThreshold
Int32

The maximum size in bytes of the in-memory ArrayPool<T> used to buffer the stream. Larger request bodies are written to disk.

bufferLimit
Int64

The maximum size in bytes of the request body. An attempt to read beyond this limit will cause an IOException.

Remarks

Temporary files for larger requests are written to the location named in the ASPNETCORE_TEMP environment variable, if any. If that environment variable is not defined, these files are written to the current user's temporary folder. Files are automatically deleted at the end of their associated requests.

Applies to