AuthenticationLevelとは? わかりやすく解説

AuthenticationLevel 列挙体

WMI (Windows Management Instrumentation) に接続するために使用する認証レベル記述します。これは WMI への COM 接続使用します

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

Public Enumeration AuthenticationLevel
Dim instance As AuthenticationLevel
public enum AuthenticationLevel
public enum class AuthenticationLevel
public enum AuthenticationLevel
public enum AuthenticationLevel
メンバメンバ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

AuthenticationLevel 列挙体

メモ : この列挙体は、.NET Framework version 2.0新しく追加されたものです。

WebRequest クラスおよびその派生クラス使用してリソース要求する場合の、認証偽装に関するクライアント要件指定します

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

Public Enumeration AuthenticationLevel
Dim instance As AuthenticationLevel
public enum AuthenticationLevel
public enum class AuthenticationLevel
public enum AuthenticationLevel
public enum AuthenticationLevel
メンバメンバ
 メンバ説明
MutualAuthRequestedクライアントサーバー認証する必要がありますサーバー認証されていない場合でも、要求失敗しません。相互認証が行われたかどうかを確認するには、WebResponse.IsMutuallyAuthenticated プロパティの値をチェックします。 
MutualAuthRequiredクライアントサーバー認証する必要がありますサーバー認証されていない場合相互認証失敗したことを示す ProtocolViolationException 内部例外と共に、IOException がアプリケーション発生します。 
Noneクライアントサーバー認証は必要ありません。 
解説解説
使用例使用例

要求認証フラグ設定するコード例次に示します

// 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();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
System.Net.Security 名前空間


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

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

辞書ショートカット

すべての辞書の索引

「AuthenticationLevel」の関連用語

AuthenticationLevelのお隣キーワード
検索ランキング

   

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



AuthenticationLevelのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS