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

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

WindowsAuthenticationEventArgs クラス

WindowsAuthentication_OnAuthenticate イベントデータ提供します。このクラス継承できません。

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

Public NotInheritable Class
 WindowsAuthenticationEventArgs
    Inherits EventArgs
Dim instance As WindowsAuthenticationEventArgs
public sealed class WindowsAuthenticationEventArgs
 : EventArgs
public ref class WindowsAuthenticationEventArgs
 sealed : public EventArgs
public final class WindowsAuthenticationEventArgs
 extends EventArgs
public final class WindowsAuthenticationEventArgs
 extends EventArgs
解説解説

WindowsAuthenticationEventArgs クラスWindowsAuthentication_OnAuthenticate イベントイベント値を指定し現在の要求対すカスタムWindows ID指定できるようにするために使用されます。

WindowsAuthenticationModule は、IIS によって提供されWindows ID現在の HttpContext を使用して WindowsAuthenticationEventArgs オブジェクト構築し、それを WindowsAuthentication_OnAuthenticate イベント渡します

WindowsAuthentication_OnAuthenticate イベント渡した WindowsAuthenticationEventArgs オブジェクトUser プロパティ使用して現在の HttpContextUser プロパティカスタムの IPrincipal オブジェクト設定できますWindowsAuthentication_OnAuthenticate イベント中に User プロパティ値が指定されない場合IIS によって提供される Windows ID現在の要求対すID として使用されます。IIS匿名認証使用する場合Identity プロパティには、GetAnonymous メソッドによって返される ID設定されます。

WindowsAuthentication_OnAuthenticate イベントは、認証 ModeWindows設定されWindowsAuthenticationModuleアプリケーションアクティブ HTTP モジュールである場合にのみ生成されます。

使用例使用例

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.EventArgs
    System.Web.Security.WindowsAuthenticationEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「WindowsAuthenticationEventArgs クラス」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS