ServicePointManager.Expect100Continue プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ServicePointManager.Expect100Continue プロパティの意味・解説 

ServicePointManager.Expect100Continue プロパティ

100-Continue 動作を使用するかどうかを決定する Boolean 値を取得または設定します。

名前空間: System.Net
アセンブリ: System (system.dll 内)
構文構文

Public Shared Property Expect100Continue
 As Boolean
Dim value As Boolean

value = ServicePointManager.Expect100Continue

ServicePointManager.Expect100Continue = value
public static bool Expect100Continue
 { get; set; }
public:
static property bool Expect100Continue {
    bool get ();
    void set (bool value);
}
/** @property */
public static boolean get_Expect100Continue
 ()

/** @property */
public static void set_Expect100Continue
 (boolean value)
public static function get
 Expect100Continue () : boolean

public static function set
 Expect100Continue (value : boolean)

プロパティ値
POST 要求に対して 100-Continue 応答を期待する場合は true。それ以外の場合は false。既定値は true です。

解説解説

このプロパティを true に設定した場合、POST メソッドを使用するクライアント要求は、サーバーから 100-Continue 応答が送信されるまで待機し、ポストするデータの送信はその応答の後に行われます。これにより、サーバーが要求のヘッダーに基づいて要求を拒否する場合に、大量のデータがクライアントからネットワークを通じて無駄に送信されることを避けることができます。

たとえば、Expect100Continue プロパティを false にしたとします。その場合、サーバーに要求が送信される際には、データも一緒に送信されます。要求のヘッダーが読み取られた後、サーバーが認証を要求し、401 応答を送信した場合、クライアントは適切な認証ヘッダーを付けてデータを再送信する必要があります。

一方、このプロパティが true である場合は、まず要求ヘッダーだけがサーバーに送信されます。サーバーが要求を拒否しなければ、100-Continue 応答によってデータの送信が許可されます。前述の例のように、サーバーによって認証が要求され、401 応答が返された場合でも、その時点ではデータはまだクライアントから送信されていないので、無駄な通信は発生しません。

このプロパティの値を変更しても、既存の ServicePoint オブジェクトには影響しません。変更後に作成された新しい ServicePoint オブジェクトだけに影響します。

Expect 100-Continue 機能の詳細については、IETF RFC 2616 Section 10.1.1 を参照してください。

使用例使用例

このプロパティを設定するコード例を次に示します。

ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
    ServicePointManager.DefaultPersistentConnectionLimit
ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;
ServicePointManager::UseNagleAlgorithm = true;
ServicePointManager::Expect100Continue = true;
ServicePointManager::CheckCertificateRevocationList = true;
ServicePointManager::DefaultConnectionLimit = ServicePointManager::DefaultPersistentConnectionLimit;

ServicePointManager.set_UseNagleAlgorithm(true);
ServicePointManager.set_Expect100Continue(true);
ServicePointManager.set_CheckCertificateRevocationList(true);
ServicePointManager.set_DefaultConnectionLimit(
    ServicePointManager.DefaultPersistentConnectionLimit);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ServicePointManager クラス
ServicePointManager メンバ
System.Net 名前空間



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「ServicePointManager.Expect100Continue プロパティ」の関連用語

ServicePointManager.Expect100Continue プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ServicePointManager.Expect100Continue プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS