HttpRequestRewindExtensions.EnableBuffering 方法

定義

多載

EnableBuffering(HttpRequest)

requestBody 請確定 可以多次讀取 。 通常緩衝區要求記憶體中的主體;會將大於 30K 個位元組的要求寫入磁片。

EnableBuffering(HttpRequest, Int32)

requestBody 請確定 可以多次讀取 。 通常緩衝區要求記憶體中的主體;會將大於 bufferThreshold 位元組的要求寫入磁片。

EnableBuffering(HttpRequest, Int64)

requestBody 請確定 可以多次讀取 。 通常緩衝區要求記憶體中的主體;會將大於 30K 個位元組的要求寫入磁片。

EnableBuffering(HttpRequest, Int32, Int64)

requestBody 請確定 可以多次讀取 。 通常緩衝區要求記憶體中的主體;會將大於 bufferThreshold 位元組的要求寫入磁片。

EnableBuffering(HttpRequest)

requestBody 請確定 可以多次讀取 。 通常緩衝區要求記憶體中的主體;會將大於 30K 個位元組的要求寫入磁片。

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)

參數

request
HttpRequest

HttpRequest要準備的 。

備註

大型要求的暫存檔會寫入環境變數中 ASPNETCORE_TEMP 名為 的位置,如果有的話。 如果未定義該環境變數,這些檔案會寫入目前使用者的暫存資料夾。 檔案會在相關聯的要求結束時自動刪除。

適用於

EnableBuffering(HttpRequest, Int32)

requestBody 請確定 可以多次讀取 。 通常緩衝區要求記憶體中的主體;會將大於 bufferThreshold 位元組的要求寫入磁片。

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)

參數

request
HttpRequest

HttpRequest要準備的 。

bufferThreshold
Int32

用來緩衝資料流程之記憶體 ArrayPool<T> 內位元組的大小上限。 較大的要求主體會寫入磁片。

備註

大型要求的暫存檔會寫入環境變數中 ASPNETCORE_TEMP 名為 的位置,如果有的話。 如果未定義該環境變數,這些檔案會寫入目前使用者的暫存資料夾。 檔案會在相關聯的要求結束時自動刪除。

適用於

EnableBuffering(HttpRequest, Int64)

requestBody 請確定 可以多次讀取 。 通常緩衝區要求記憶體中的主體;會將大於 30K 個位元組的要求寫入磁片。

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)

參數

request
HttpRequest

HttpRequest要準備的 。

bufferLimit
Int64

要求本文的位元組大小上限。 嘗試讀取超過此限制會導致 IOException

備註

大型要求的暫存檔會寫入環境變數中 ASPNETCORE_TEMP 名為 的位置,如果有的話。 如果未定義該環境變數,這些檔案會寫入目前使用者的暫存資料夾。 檔案會在相關聯的要求結束時自動刪除。

適用於

EnableBuffering(HttpRequest, Int32, Int64)

requestBody 請確定 可以多次讀取 。 通常緩衝區要求記憶體中的主體;會將大於 bufferThreshold 位元組的要求寫入磁片。

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)

參數

request
HttpRequest

HttpRequest要準備的 。

bufferThreshold
Int32

用來緩衝資料流程之記憶體 ArrayPool<T> 內位元組的大小上限。 較大的要求主體會寫入磁片。

bufferLimit
Int64

要求本文的位元組大小上限。 嘗試讀取超過此限制會導致 IOException

備註

大型要求的暫存檔會寫入環境變數中 ASPNETCORE_TEMP 名為 的位置,如果有的話。 如果未定義該環境變數,這些檔案會寫入目前使用者的暫存資料夾。 檔案會在相關聯的要求結束時自動刪除。

適用於