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
}