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) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

WindowsAuthenticationEventArgs コンストラクタ

WindowsAuthenticationEventArgs クラス新しく作成されインスタンス初期化します。

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

Public Sub New ( _
    identity As WindowsIdentity, _
    context As HttpContext _
)
Dim identity As WindowsIdentity
Dim context As HttpContext

Dim instance As New WindowsAuthenticationEventArgs(identity,
 context)
public WindowsAuthenticationEventArgs (
    WindowsIdentity identity,
    HttpContext context
)
public:
WindowsAuthenticationEventArgs (
    WindowsIdentity^ identity, 
    HttpContext^ context
)
public WindowsAuthenticationEventArgs (
    WindowsIdentity identity, 
    HttpContext context
)
public function WindowsAuthenticationEventArgs
 (
    identity : WindowsIdentity, 
    context : HttpContext
)

パラメータ

identity

WindowsID オブジェクト

context

イベントコンテキスト

解説解説

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

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WindowsAuthenticationEventArgs クラス
WindowsAuthenticationEventArgs メンバ
System.Web.Security 名前空間
その他の技術情報
Windows 認証プロバイダ

WindowsAuthenticationEventArgs プロパティ


パブリック プロパティパブリック プロパティ

参照参照

関連項目

WindowsAuthenticationEventArgs クラス
System.Web.Security 名前空間

その他の技術情報

Windows 認証プロバイダ

WindowsAuthenticationEventArgs メソッド


WindowsAuthenticationEventArgs メンバ

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

WindowsAuthenticationEventArgs データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド WindowsAuthenticationEventArgs WindowsAuthenticationEventArgs クラス新しく作成されインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

WindowsAuthenticationEventArgs クラス
System.Web.Security 名前空間

その他の技術情報

Windows 認証プロバイダ



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

辞書ショートカット

すべての辞書の索引

「WindowsAuthenticationEventArgs」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS