Re: Login Form return OK, but lgoin failed!

  •  09-03-2009, 2:11 AM

    Re: Login Form return OK, but lgoin failed!

    Hi

    while you use System.Web.Security.FormsAuthentication.SetAuthCookie(username, false, HttpRuntime.AppDomainAppVirtualPath);
    to save the authentication,

    In the GetLogonIdentity, you can write this thing :
     
    public override AppChatIdentity GetLogonIdentity()
    {
    if(!HttpContext.Current.User.Identity.IsAuthenticated)
        return null;
    return new AppChatIdentity(HttpContext.Current.User.Identity.Name, false, ToUserId(HttpContext.Current.User.Identity.Name), HttpContext.Current.Request.UserHostAddress);
    }
    Regards,
    Terry

    }
View Complete Thread