You can try this Global.asax :
<%@ Application Language="C#" %>
<%@ Import Namespace="CuteChat" %>
<script runat="server">
void Application_Start(object sender, EventArgs e) {
ChatProvider.Instance = new AspNetChatProvider();
ChatSystem.Start(new AppSystem());
}
public class AspNetChatProvider : ChatProvider
{
public override string GetConnectionString()
{
return System.Configuration.ConfigurationManager.ConnectionStrings["SiteSqlServer"].ConnectionString;
}
public override AppChatIdentity GetLogonIdentity()
{
string fullname=HttpContext.Current.Request.ServerVariables["LOGON_USER"];
if (fullname == null || fullname == "")
return null;
string nickname = fullname.Split('\\')[1];
return new AppChatIdentity(nickname, false, ToUserId(nickname), HttpContext.Current.Request.UserHostAddress);
}
public override string FindUserLoginName(string nickName)
{
return nickName;
}
public override bool GetUserInfo(string loginName, ref string nickName, ref bool isAdmin)
{
if (loginName == null || loginName == "")
return false;
try
{
System.Security.Principal.SecurityIdentifier sid = (System.Security.Principal.SecurityIdentifier)new System.Security.Principal.NTAccount(loginName).Translate(typeof(System.Security.Principal.SecurityIdentifier));
}
catch
{
return false;
}
nickName = loginName;
if (nickName == "Administrator")
{
isAdmin = true;
}
return true;
}
public override bool ValidateUser(string username, string password)
{
return false;
}
}
</script>