WindowsAuthenticationModule クラス
アセンブリ: System.Web (system.web.dll 内)


認証 Mode が Windows に設定されている場合、WindowsAuthenticationModule は、現在の HttpContext の User プロパティを、現在の要求に対して IIS が提供した Windows ID を表す IPrincipal オブジェクトに設定します。IIS が匿名認証を使用する場合、WindowsAuthenticationModule は、GetAnonymous メソッドによって返される ID を使用します。
WindowsAuthenticationModule は Authenticate イベントを公開します。このイベントにより、現在の HttpContext の User プロパティにカスタム IPrincipal オブジェクトを設定できます。Authenticate イベントには、ASP.NET アプリケーションの Global.asax ファイルに、WindowsAuthentication_OnAuthenticate というサブルーチンを指定することによってアクセスします。

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


System.Web.Security.WindowsAuthenticationModule


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- WindowsAuthenticationModule クラスのページへのリンク