Home
Cute Chat / Web Messenger Developer's Guide Prev Page Prev Page
Getting Started
Features of Cute Chat
Features of Web Messenger
Chat Requirements
Web Messenger Requirements
License
Deployment & Integration
Installing Chat/Messenger Standalone
Dotnetnuke 4.x Integration
Dotnetnuke 3.x Integration
Dotnetnuke 2.x Integration
IbuySpy(C#) Integration
IbuySpy(VB) Integration
Snitz forum Integration
Rainbow Portal Integration
FAQ
Overview
Run Cute Chat from different folder
Customization
Set up Cute Chat banner ads
Set up Web Messenger banner ads
Add a time stamp to each message
Embed mode
Run Cute Chat in embed mode
Run Web Messenger in embed mode
Localization
Specify the custom culture name
Add a new language file
Oracle and Access
Use Oracle as Data Source
Use Access as Data Source
Integration with an existing user membership database.
Integration with an existing user membership database (C#).
Integration with an existing user membership database (VB).
General Installation Instructions
Cute Chat

Integration with an existing user membership database (C#)

Integration with an existing user membership database (C#)


Before you get started, you need to understand the 'UniqueName' in CuteChat. In CuteChat, UniqueName means the unique data of your user. Depending on how you implement the user system, in some systems, the best unique data is the user ID; in some system, every user have a unique account name; some systems like MSN, the unique data is the user email. It could be string(username, email), integer(user ID) or GUID.

Unzip the integration package zip file and open cs/Global.asax file.

Implement IHttpApplicationConnectionStringProvider interface and Let CuteChat know the database connection string


In this step, you need to implement one simple method:

//Retrieves the Cute Chat database connection string
public string GetConnectionString(CuteSoft.Chat.UserIdentity user)

Code Example

public string GetConnectionString(CuteSoft.Chat.UserIdentity user)

{

    return System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];

}

Implement IHttpApplicationUserAdapter interface and Let CuteChat know who has logged in the website


In this step, you need to implement one simple method:

//Retrieves the unique identity of the current user
public CuteSoft.Chat.UserIdentity GetUserIdentity()

Code Example

public string GetUserUniqueName()

{    
     if (Context.User.Identity.IsAuthenticated)
        return Context.User.Identity.Name; 
    return null;

}

public CuteSoft.Chat.UserIdentity GetUserIdentity()

{

    string uniquename = GetUserUniqueName();

    if (uniquename == null)

    {

        return CuteSoft.Chat.UserIdentity.CreateNull();

    }

    CuteSoft.Chat.UserIdentity identity = new CuteSoft.Chat.UserIdentity(uniquename, null, Request.UserHostAddress);

    return identity;

}



The CHM file was converted to HTML by chm2web software.