Cute Chat and Cute Web Messenger

Membership Database Integration

1 Install Cute Chat database Execute the following SQL files: SQLScripts\cutechat4.sql against your database.
2 Deploy Dlls and license files Copy the CuteChat.dll, CuteChat.AppCode.dll, CuteChat.lic, CuteMessenger.lic and CuteLiveSupport.lic to the project \bin directory.
3 Deploy Cute Chat client files CuteSoft_Client folder and all files it contains should be deployed to the project root directory.
4 Membership Database Integration. a. Create a class that inherits CuteChat.ChatProvider and implement these methods:

public override string GetConnectionString()
        return the connection string , for the CuteChat

public override string FindUserLoginName(string nickName)
        find the login username from the display name or null if the user is not found.
public override AppChatIdentity GetLogonIdentity()
    need to find the information of current user. Return null if user is anonymous.

    string loginname=...
    string nickname=...
    return new AppChatIdentity(nickname, false, ToUserId(loginname), HttpContext.Current.Request.UserHostAddress);
public override bool GetUserInfo(string loginName, ref string nickName, ref bool isAdmin)
       return false , if the loginName is invalid.
       otherwise set the nickName and isAdmin , and return ture
public override bool ValidateUser(string loginName, string password)
        check the username/password . 
        if valid , set the cookie.

b. Initialize an instance of provider when the application starts:

CuteChat.ChatProvider.Instance = new MyChatProvider();
CuteChat.ChatSystem.Start(new CuteChat.AppSystem());
5 Add chat rooms into web pages Get the chat rooms collection from the database, then databind the results to a DataGrid/DataList/Reapter server control in your web page.
ArrayList lobbies=new ArrayList();
foreach(LobbyInfo lobby in ChatApi.GetLobbyInfoArray())
Dim lobbies As New ArrayList()
For Each LobbyInfo as lobby In ChatApi.GetLobbyInfoArray()
6 Add chat admin button into web pages <%if (CuteChat.ChatWebUtility.CurrentIdentityIsAdministrator)
 <Asp:HyperLink runat=server NavigateUrl="~/CuteSoft_Client/CuteChat/Admin/" ID="Hyperlink1" NAME="Hyperlink1">Chat Admin</Asp:HyperLink>
<%} %>
7 Add web messenger button into web pages <br>   <%="<"%><%="script"%><%="src='"%><%=ResolveUrl("~/CuteSoft_Client/CuteChat/IntegrationUtility.js.aspx")%><%="'"%><%=">"%><%="<"%><%="/script"%><%=">"%><br>   <imgsrc="<%=ResolveUrl("~/CuteSoft_Client/CuteChat/images/icon_invite.gif")%>" align=absmiddle><a href="###" onclick="JavaScript:Chat_OpenMessenger()" >Messenger</a>