Membership Database Integration

Last post 01-08-2010, 12:49 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  01-07-2010, 10:16 PM 58089

    Membership Database Integration

    Hello I am integrating the Messenger into my site.  I am using VB.
    I have read the documentation however unsure where I need to put the following code:
     
    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());
  •  01-08-2010, 12:49 AM 58093 in reply to 58089

    Re: Membership Database Integration

    Hi misnstt ,
     
    Initialize an instance of provider when the application starts
     
    Download the package below, there contains some chat provider example. We written it in Global.asax.
     
     
    example code in "CuteChat5IntegrationPackage.zip\ChatProvider examples";
     
    Any other questions you can mail to me [email protected]
     
    Regards,
     
    Ken
View as RSS news feed in XML