WindowsAuthenticationModule クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WindowsAuthenticationModule クラスの意味・解説 

WindowsAuthenticationModule クラス

Windows 認証有効な場合ASP.NET アプリケーションに対してユーザーID設定します。このクラス継承できません。

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

Public NotInheritable Class
 WindowsAuthenticationModule
    Implements IHttpModule
Dim instance As WindowsAuthenticationModule
public sealed class WindowsAuthenticationModule
 : IHttpModule
public ref class WindowsAuthenticationModule
 sealed : IHttpModule
public final class WindowsAuthenticationModule
 implements IHttpModule
public final class WindowsAuthenticationModule
 implements IHttpModule
解説解説

認証 ModeWindows設定されている場合WindowsAuthenticationModule は、現在の HttpContext の User プロパティを、現在の要求に対して IIS提供した Windows ID を表す IPrincipal オブジェクト設定しますIIS匿名認証使用する場合WindowsAuthenticationModule は、GetAnonymous メソッドによって返される ID使用します

WindowsAuthenticationModule は Authenticate イベント公開します。このイベントにより、現在の HttpContextUser プロパティカスタム IPrincipal オブジェクト設定できますAuthenticate イベントには、ASP.NET アプリケーションの Global.asax ファイルに、WindowsAuthentication_OnAuthenticate というサブルーチン指定することによってアクセスます。

使用例使用例

WindowsAuthentication_OnAuthenticate イベント使用して現在の HttpContextUser プロパティカスタム IPrincipal オブジェクト設定するコード例次に示します

Public Sub WindowsAuthentication_OnAuthenticate(sender
 As Object, args As WindowsAuthenticationEventArgs)
  If Not args.Identity.IsAnonymous Then
    args.User = New Samples.AspNet.Security.MyPrincipal(args.Identity)
  End If
End Sub
public void WindowsAuthentication_OnAuthenticate(object
 sender, WindowsAuthenticationEventArgs args)
{
  if (!args.Identity.IsAnonymous)
  {
    args.User = new Samples.AspNet.Security.MyPrincipal(args.Identity);
  }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
  System.Web.Security.WindowsAuthenticationModule
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WindowsAuthenticationModule メンバ
System.Web.Security 名前空間
その他の技術情報
Windows 認証プロバイダ
Global.asax 構文



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

辞書ショートカット

すべての辞書の索引

「WindowsAuthenticationModule クラス」の関連用語

WindowsAuthenticationModule クラスのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS