The problem happens for both... "Login Form return OK, but login failed!" it doesn't matter what user type I try to login with... the key is to use the alternate application because the website already has an application name... so there needs to be a way to pass the application name along with the connection attempt.
I think this is where the problem is:
/// <summary>
/// Gets the logon identity.
/// </summary>
/// <returns>Override of AppChatIdentity.</returns>
public override AppChatIdentity GetLogonIdentity()
{
if (System.Web.Security.Membership.Provider.Name == "AspNetSqlMembershipProviderLiveSupport")
{
//this I think is where the problem is...
System.Web.Security.MembershipUser user = System.Web.Security.Membership.GetUser();
if (user != null && user.IsApproved)
{
return new AppChatIdentity(user.UserName, false, ToUserId(user.UserName), HttpContext.Current.Request.UserHostAddress);
}
}
return null;
}
System.Web.Security.Membership.GetUser(); is trying to use the default provider when it should be attempt to use the AspNetSqlmembershipProviderLiveSupport.