Is there any method to allow my Database Users to enter into the chat room ,istead of using cute chat's login form.

Last post 11-28-2005, 4:44 AM by Adam. 28 replies.
Page 2 of 2 (29 items)   < Previous 1 2
Sort Posts: Previous Next
  •  11-20-2005, 11:15 PM 12833 in reply to 12816

    Re: We have a paid customer installation service $100

    Plz reply my post
    thanks
    mekalaasri
  •  11-21-2005, 11:33 PM 12845 in reply to 12833

    Re: We have a paid customer installation service $100

    plz reply my post as early as possible
     
    thanks
    Mekalaasri
  •  11-21-2005, 11:46 PM 12846 in reply to 12804

    Re: We have a paid customer installation service $100

    mekalaasri,

    CuteChat implements what is commonly known as a "Provider Model" design pattern. This "provider" component exposes a standard interface to the service logic, but allows developers to implement the provider component on top of a repository of their choice.

    By creating custom providers, developers can easily write their own data and business logic layers and simply plug it into existing user management system and reuse the same set of user management system.

    To help you quickly use the CuteChat in your ASP.NET applications, CuteSoft team has finished the providers for Cute Chat standalone, DotNetNuke 2.X, DotNetNuke 3.X, IbuySpy and Community Starter Kit.

    If your portal is not based on the above projects. You need to create a custom Provider to integrate CuteChat with existing user login system.



     


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-23-2005, 2:13 AM 12907 in reply to 12846

    custom Provider to integrate CuteChat with existing user login system

    hai,
    thanx Adam
    I have found the method  for this query
    "How can I hook CuteChat with my existing login system?"

    It is in
    Start >> All programs >> CuteChat >> CuteChat Help

    I followed those steps

    Integrating with existing user login system

    If your portal is not based on the above projects. You need to create a custom Provider to integrate CuteChat with existing user login system. To implement a custom CuteChat Provider, you will need to provide a concrete implementation of the SqlDataProvider class and IUserIdentityAdapter class, and plug it into the system through appropriate configuration settings.

    In this section we will look at the steps that you can follow. To do this, we will build a CuteChat provider for the lastest ASPNetForums 2.0. The Provider for ASPNetForums 2.0 will allow CuteChat communicate with the existing ASPNetForums 2.0 login system.

     

    We assume the develpers use the Visual Studio .NET development environment in the following example.

    1. Open Microsoft Visual Studio .NET.
    2. On the File menu, click New Project.
    3. In the New Project dialog box, in Project Types, click Visual C# Projects.
    4. In the right pane, click Class Library.
    5. In the Name box, type a name (CuteChat.AspNetForums2Lib) for the new project and delete the Class1.cs that was auto create for us.  

      Set the project property Assembly Name to: CuteChat.AspNetForums2Lib
      Set the project property Default Namespace to: CuteChat.AspNetForums2Lib

      Add your copyright and version requrements to the class file, AssemblyInfo.cs.
    6. In the Location box, select the location you want to save the file to.
    7. Add a reference to CuteChat.dll. 

      Add a Reference reference to the System, System.Data, System.Web,System.XML namespace 
    8. Derive a class from the SqlDataProvider abstract base class and name it AspNetForumsSqlDataProvider .

       

      public class AspNetForumsSqlDataProvider : SqlDataProvider 
           {
           }
           


      To provide a complete implementation, we will need to provide overrides for all of the methods and properties of the SqlDataProvider class as followings:

      The implementation of the ListUserUniqueName method

      Description:
      Retrieves all the user names in the database.

      public override string[] ListUserUniqueName() { 
                                      using(SqlCommand cmd=CreateCommand()) { 
                                          cmd.CommandText="select UserName from "+OwnerPrefix+"Forums_Users"; 
                                          return SqlDataAccess.ExecuteStringArray(cmd); 
                                      } 
                                  }

      The implementation of the ListRoleUniqueName method

      Description:
      Retrieves all the role names available to all users.

      public override string[] ListRoleUniqueName() { 
                                      using(SqlCommand cmd=CreateCommand()) { 
                                          cmd.CommandText="select Name from "+OwnerPrefix+"Forums_Roles"; 
                                          return SqlDataAccess.ExecuteStringArray(cmd); 
                                      } 
                                  }

      The implementation of the IsUserNickNameExists method

      Description:
      Check if a username is already in use in the database .

      public override bool IsUserNickNameExists(string nickname) { 
                                      using(SqlCommand cmd=CreateCommand()) { 
                                          cmd.CommandText="select count(*) from "+OwnerPrefix+"forums_Users where UserName=@nickname"; 
                                          SqlDataAccess.AddParameter(cmd.Parameters,"@nickname",nickname); 
                                          int c=Convert.ToInt32(cmd.ExecuteScalar()); 
                                          return c>0; 
                                     } 
                                  }

      The implementation of the ListRoleUniqueNameOfUser method

      Description:
      Retrieves all the roles the current user belongs to.

      public override string[] ListRoleUniqueNameOfUser(string useruniquename) { 
                                      using(SqlCommand cmd=CreateCommand()) { 
                                          cmd.CommandText=@" SELECT r.Name FROM "+OwnerPrefix+@"forums_Users u INNER JOIN "+OwnerPrefix+@"forums_UsersInRoles ur ON u.UserID = ur.UserID INNER JOIN "+OwnerPrefix+@"forums_Roles r ON ur.RoleID = r.RoleID where u.UserName=@uniquename "; 
                                          SqlDataAccess.AddParameter(cmd.Parameters,"@uniquename",useruniquename); 
                                          return SqlDataAccess.ExecuteStringArray(cmd); 
                                     } 
                                  }

      The implementation of the ListUserUniqueNameOfRole method

      Description:
      Retrieves all the user names of the input role name

      public override string[] ListUserUniqueNameOfRole(string roleuniquename) { 
                                      using(SqlCommand cmd=CreateCommand()) { 
                                          cmd.CommandText=@" SELECT u.UserName FROM "+OwnerPrefix+@"forums_Users u INNER JOIN "+OwnerPrefix+@"forums_UsersInRoles ur ON u.UserID = ur.UserID INNER JOIN "+OwnerPrefix+@"forums_Roles r ON ur.RoleID = r.RoleID where r.Name=@uniquename "; 
                                          SqlDataAccess.AddParameter(cmd.Parameters,"@uniquename",roleuniquename); 
                                          return SqlDataAccess.ExecuteStringArray(cmd); 
                                     } 
                                  }

      The implementation of the GetUserInfo method

      Description:
      Get the current user information from the AspNetForums2 login system

      public override UserInfoData GetUserInfo(string useruniquename) { 
                                    string  username; 
                                    using(SqlCommand cmd=CreateCommand()) 
                                    { 
                                      cmd.CommandText="select UserName from "+OwnerPrefix+"Forums_Users where UserName=@username"; 
          SqlDataAccess.AddParameter(cmd.Parameters,"@username",useruniquename); 
          using(SqlDataReader sdr=cmd.ExecuteReader()) { 
                                         bool haverecord=sdr.Read(); 
             if(!haverecord) 
                                             return null; 
                                         username=sdr.GetString(0); 
                                      }
                                    } 
                                    
                                    bool isadmin=false; 
        foreach(string rolename in ListRoleUniqueNameOfUser(useruniquename)) 
                                    { 
                                       if((string.Compare(rolename,"Global Administrators",true)==0)||(string.Compare(rolename,"Forum Administrators",true)==0)) 
                                       { 
                                          isadmin=true; 
                                       } 
                                    } 
                                    return new UserInfoData(useruniquename,username,isadmin); 
                                   }

      The implementation of the GetRoleInfo method

      Description:
      Retrieves role information of the input role name

      public override RoleInfoData GetRoleInfo(string roleuniquename) { 
                                      using(SqlCommand cmd=CreateCommand()) { 
                                          cmd.CommandText="select Name from "+OwnerPrefix+"Forums_Roles where Name=@roleid"; 
                                          SqlDataAccess.AddParameter(cmd.Parameters,"@roleid",roleuniquename); 
                                          using(SqlDataReader sdr=cmd.ExecuteReader()) { 
                                              bool haverecord=sdr.Read(); 
                                              if(!haverecord) 
                                                  return null; 
                                              return new RoleInfoData(roleuniquename,sdr.GetString(0)); 
                                           } 
                                      } 
                                   }

    9. Create a class which implements the IUserIdentityAdapter interface and name it SqlServerUserIdentityAdapter.

       

      public class SqlServerUserIdentityAdapter : IUserIdentityAdapter 
           {
           }
           


      To provide a complete implementation, we will need to provide overrides for the two methos of the SqlServerUserIdentityAdapter class as followings:

      The implementation of the GetCurrentUserUniqueName method

      Description:
      Retrieves the user name of the current user.

      public string GetCurrentUserUniqueName(HttpContext context) { 
                                      IIdentity iden=context.User.Identity; 
                                      if(iden==null||!iden.IsAuthenticated) 
                                         return null; 
                                      if(iden.Name==null||iden.Name.Length==0) 
                                         return null; 
                                      return iden.Name; 
                                  }

      The implementation of the IsAdministrators method

      Description:
      Check the current user is an administrator or not..

      public bool IsAdministrators(string useruniquename) { 
                                      using(IDataAccess da=ChatConfig.CreateDataAccess()) { 
                                         int userid=da.GetUserInternalId(useruniquename); 
                                         if(userid==0)
                                             return false; 
                                         DataRow row=da.SelectUser(userid); 
                                         if(row==null)
                                             return false; 
                                         return Convert.ToBoolean(row["isadmin"]); 
                                      } 
                                  }


    10. Start the application: Press F5, or click Start on the Debug menu.  The classes will be compiled into an assembly CuteChat.AspNetForum2Lib.dll. Test and deploy the new assembly to a running server bin directory.

    But Error was occured when i run my application 

    Error
     "The type or namespace name 'SqlDataProvider' could not be found (are you missing a using directive or an assembly reference)"
     

    How to Solve this error?
     
    In this help File
    >>
    To implement a custom CuteChat Provider, you will need to provide a concrete implementation of the SqlDataProvider class and IUserIdentityAdapter class, and plug it into the system through appropriate configuration settings.
     
    Where to get  SqlDataProvider class and IUserIdentityAdapter class?


    plz help me
    We need the soln as early as possible

    thanks
    mekalaasri
     
     
     
  •  11-23-2005, 8:35 AM 12916 in reply to 12907

    Re: custom Provider to integrate CuteChat with existing user login system

    plz reply my post
    i need the soln as early as possible
     
    thanks
    Mekalaasri
  •  11-23-2005, 11:15 PM 12965 in reply to 12916

    Re: custom Provider to integrate CuteChat with existing user login system

    hai

    plz reply my post

    thanks

    mekalaasri

  •  11-27-2005, 11:56 PM 13109 in reply to 12965

    Re: custom Provider to integrate CuteChat with existing user login system

    plz reply my post
    we r waiting for ur reply.
    plz help us as early as possible
     
    thanks
    mekalaasri
  •  11-28-2005, 4:38 AM 13125 in reply to 13109

    Re: custom Provider to integrate CuteChat with existing user login system

    plz reply my post ,we purchased CuteChat ,but eventhough we cannt use it. We can use it only after ur response.
    We are hope that u will surely reply today.
    plz  reply it today
    thanks
    mekalaasri
     
  •  11-28-2005, 4:44 AM 13126 in reply to 13125

    Re: custom Provider to integrate CuteChat with existing user login system

    mekalaasri,
     
    You need to write your own provider for your own portal. Please check the document in the developer guide.
     
    Otherwise you need to use the CuteChat standalone which means that your users need to login the chat again.
     
    We can't write the provider for your own portal.

     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

Page 2 of 2 (29 items)   < Previous 1 2
View as RSS news feed in XML