ユーザーが認証された後に発生するイベントはありますか (Windows)? Application_Start() で実行していますが、false User.Identity.IsAuthenticated
.
私が望むのは、ロールを手動で作成してユーザーに追加することです。
ユーザーが認証された後に発生するイベントはありますか (Windows)? Application_Start() で実行していますが、false User.Identity.IsAuthenticated
.
私が望むのは、ロールを手動で作成してユーザーに追加することです。
私はこれを使用しました:
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
if (HttpContext.Current.User != null)
{
if (HttpContext.Current.User.Identity.IsAuthenticated)
{
if (HttpContext.Current.User.Identity is WindowsIdentity)
{
if (string.IsNullOrEmpty(Usuario.Nome))
{
プロジェクトのプロパティ(プロジェクトでalt + enter)で、WEBをクリックしてNTLM AUTHENTICATIONをチェックしてください。
これは私にとってはうまくいきました。HttpContext.Current.User.Identity
null ではなくなりました