0

認証のためにサードパーティの httpmodule とやり取りしています。それとやり取りするためにカスタムロールプロバイダーを実装しました。ただし、urlauthorization に期待される RolePrincipal の代わりに CustomPrincipal を使用します。

customprincipal を取得し、新しい RolePrincipal をインスタンス化し、それらが提供するカスタム Identity 実装をコピーするために、global.asax のどのイベントにフックできますか?

4

1 に答える 1

1

Application_AuthenticateRequest イベントを使用する必要があります

protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
    if (HttpContext.Current.User != null)
    {
        if (HttpContext.Current.User.Identity.IsAuthenticated)
        { 
        }
    }
}
于 2009-10-19T11:49:15.490 に答える