WindowsAuthenticationModule.Authenticate イベントとは? わかりやすく解説

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

WindowsAuthenticationModule.Authenticate イベント

アプリケーション現在の要求認証するときに発生します

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

Public Event Authenticate As
 WindowsAuthenticationEventHandler
Dim instance As WindowsAuthenticationModule
Dim handler As WindowsAuthenticationEventHandler

AddHandler instance.Authenticate, handler
public event WindowsAuthenticationEventHandler Authenticate
public:
event WindowsAuthenticationEventHandler^ Authenticate {
    void add (WindowsAuthenticationEventHandler^ value);
    void remove (WindowsAuthenticationEventHandler^ value);
}
/** @event */
public void add_Authenticate (WindowsAuthenticationEventHandler
 value)

/** @event */
public void remove_Authenticate (WindowsAuthenticationEventHandler
 value)
JScript では、イベント使用できますが、新規に宣言することはできません。
解説解説

Authenticate イベントは、AuthenticateRequest イベント時に生成されます。

WindowsAuthenticationModule クラスAuthenticate イベントには、ASP.NET アプリケーションの Global.asax ファイルに、WindowsAuthentication_OnAuthenticate というサブルーチン指定することによってアクセスできます

WindowsAuthentication_OnAuthenticate イベント渡した WindowsAuthenticationEventArgs オブジェクトUser プロパティ使用して現在の HttpContext の User プロパティカスタムの 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);
  }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WindowsAuthenticationModule クラス
WindowsAuthenticationModule メンバ
System.Web.Security 名前空間
その他の技術情報
Windows 認証プロバイダ
Global.asax 構文


このページでは「.NET Framework クラス ライブラリ リファレンス」からWindowsAuthenticationModule.Authenticate イベントを検索した結果を表示しています。
Weblioに収録されているすべての辞書からWindowsAuthenticationModule.Authenticate イベントを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からWindowsAuthenticationModule.Authenticate イベント を検索

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

辞書ショートカット

すべての辞書の索引

WindowsAuthenticationModule.Authenticate イベントのお隣キーワード
検索ランキング

   

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



WindowsAuthenticationModule.Authenticate イベントのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS