WindowsAuthenticationEventHandler デリゲート
アセンブリ: System.Web (system.web.dll 内)

Public Delegate Sub WindowsAuthenticationEventHandler ( _ sender As Object, _ e As WindowsAuthenticationEventArgs _ )
public delegate void WindowsAuthenticationEventHandler ( Object sender, WindowsAuthenticationEventArgs e )
public delegate void WindowsAuthenticationEventHandler ( Object^ sender, WindowsAuthenticationEventArgs^ e )
/** @delegate */ public delegate void WindowsAuthenticationEventHandler ( Object sender, WindowsAuthenticationEventArgs e )

WindowsAuthenticationEventHandler デリゲートは、WindowsAuthenticationModule クラスの Authenticate イベントに対して定義されています。WindowsAuthenticationModule クラスの Authenticate イベントには、ASP.NET アプリケーションの Global.asax ファイルに、WindowsAuthentication_OnAuthenticate というサブルーチンを指定することによってアクセスできます。Authenticate イベントは、AuthenticateRequest イベント時に生成されます。
WindowsAuthenticationModule は、IIS によって提供された Windows ID と現在の HttpContext を使用して WindowsAuthenticationEventArgs オブジェクトを生成し、それを WindowsAuthentication_OnAuthenticate イベントに渡します。
WindowsAuthentication_OnAuthenticate イベントに渡した WindowsAuthenticationEventArgs オブジェクトの User プロパティを使用して、現在の HttpContext の User プロパティを、カスタムの IPrincipal オブジェクトに設定できます。WindowsAuthentication_OnAuthenticate イベント中に User プロパティ値が指定されない場合、IIS によって提供される Windows ID が現在の要求に対する ID として使用されます。IIS が匿名認証を使用する場合、WindowsAuthenticationEventArgs オブジェクトの Identity プロパティには、GetAnonymous メソッドによって返される ID が設定されます。
WindowsAuthentication_OnAuthenticate イベントは、認証の Mode が Windows に設定され、WindowsAuthenticationModule がアプリケーションのアクティブ HTTP モジュールである場合にのみ生成されます。

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

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からWindowsAuthenticationEventHandler デリゲートを検索する場合は、下記のリンクをクリックしてください。

- WindowsAuthenticationEventHandler デリゲートのページへのリンク