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

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

WebResponse.IsMutuallyAuthenticated プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

相互認証が行われたかどうかを示す Boolean 値を取得します

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

Public Overridable ReadOnly
 Property IsMutuallyAuthenticated As Boolean
Dim instance As WebResponse
Dim value As Boolean

value = instance.IsMutuallyAuthenticated
public virtual bool IsMutuallyAuthenticated
 { get; }
public:
virtual property bool IsMutuallyAuthenticated {
    bool get ();
}
/** @property */
public boolean get_IsMutuallyAuthenticated ()
public function get IsMutuallyAuthenticated
 () : boolean

プロパティ
クライアントサーバー両方認証され場合trueそれ以外場合false

解説解説

相互認証要求するには、MutualAuthRequested 列挙値または MutualAuthRequired 列挙値を使用して WebRequest.AuthenticationLevel プロパティ設定しますWebRequest.AuthenticationLevel プロパティ既定値には、DelegationMutualAuthRequested含まれています。

使用例使用例

このプロパティの値をチェックするコード例次に示します

// The following example uses the System, System.Net, 
// and System.IO namespaces.

public static void RequestMutualAuth(Uri
 resource)
{
    // Create a new HttpWebRequest object for the specified resource.
    WebRequest request=(WebRequest) WebRequest.Create(resource);
    // Request mutual authentication.
   request.AuthenticationLevel = AuthenticationLevel.MutualAuthRequested;
    // Supply client credentials.
    request.Credentials = CredentialCache.DefaultCredentials;
    HttpWebResponse response = (HttpWebResponse) request.GetResponse();
    // Determine whether mutual authentication was used.
    Console.WriteLine("Is mutually authenticated? {0}", response.IsMutuallyAuthenticated);
    // Read and display the response.
    Stream streamResponse = response.GetResponseStream();
    StreamReader streamRead = new StreamReader(streamResponse);
    string responseString = streamRead.ReadToEnd();
   Console.WriteLine(responseString);
    // Close the stream objects.
    streamResponse.Close();
    streamRead.Close();
    // Release the HttpWebResponse.
    response.Close();
}
// The following example uses the System, System.Net, 
// and System.IO namespaces.
static void RequestMutualAuth( Uri^ resource
 )
{
   // Create a new HttpWebRequest object for the specified resource.
   WebRequest^ request = dynamic_cast<WebRequest^>(WebRequest::Create( resource
 ));

   // Request mutual authentication.
   request->AuthenticationLevel = AuthenticationLevel::MutualAuthRequested;

   // Supply client credentials.
   request->Credentials = CredentialCache::DefaultCredentials;
   HttpWebResponse^ response = dynamic_cast<HttpWebResponse^>(request->GetResponse());

   // Determine whether mutual authentication was used.
   Console::WriteLine( L"Is mutually authenticated? {0}", response->IsMutuallyAuthenticated
 );

   // Read and display the response.
   Stream^ streamResponse = response->GetResponseStream();
   StreamReader^ streamRead = gcnew StreamReader( streamResponse );
   String^ responseString = streamRead->ReadToEnd();
   Console::WriteLine( responseString );

   // Close the stream objects.
   streamResponse->Close();
   streamRead->Close();

   // Release the HttpWebResponse.
   response->Close();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からWebResponse.IsMutuallyAuthenticated プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からWebResponse.IsMutuallyAuthenticated プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からWebResponse.IsMutuallyAuthenticated プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「WebResponse.IsMutuallyAuthenticated プロパティ」の関連用語

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

   

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



WebResponse.IsMutuallyAuthenticated プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS