WindowsAuthenticationEventArgs.Identity プロパティ
WindowsAuthenticationEventArgs コンストラクタに渡される Windows ID を取得します。
名前空間: System.Web.Security
アセンブリ: System.Web (system.web.dll 内)
構文
Dim instance As WindowsAuthenticationEventArgs Dim value As WindowsIdentity value = instance.Identity
プロパティ値
WindowsAuthenticationEventArgs コンストラクタに渡された Windows ID。

WindowsAuthenticationModule は、IIS によって提供された Windows ID と現在の HttpContext を使用して WindowsAuthenticationEventArgs オブジェクトを構築し、それを WindowsAuthentication_OnAuthenticate イベントに渡します。
IIS が匿名認証を使用する場合、Identity プロパティには、GetAnonymous メソッドによって返される ID が設定されます。

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


- WindowsAuthenticationEventArgs.Identity プロパティのページへのリンク