Support forums
in

The chat does not works

Last post 11-05-2012, 6:38 AM by Kenneth. 21 replies.
Page 1 of 2 (22 items)   1 2 Next >
Sort Posts: Previous Next
  •  09-20-2012, 3:05 PM 74711

    The chat does not works

    The Cute Chat does not works with Visual Basic 2010 Enterprise Edition in my computer.

    Why?

    Regards and Thanks,

     

  •  09-21-2012, 7:57 AM 74714 in reply to 74711

    Re: The chat does not works

    Hi Armand66,

     

    Got any error? Can you show me in detail?  By the way, the CuteChat demo is write in c#. I suggest you deploy it under your IIS to test it.

     

    Deploy steps http://cutesoft.net/ASP.NET+Chat/Developer-Guide/scr/GettingStartedDeployment.htm

     

    Regards,

     

    Ken 

  •  09-21-2012, 11:10 AM 74717 in reply to 74714

    Re: The chat does not works

  •  09-22-2012, 3:15 AM 74724 in reply to 74711

    Re: The chat does not works

    Really the solution is converted to Visual Studio 2010, but not the project in Visual C#. It gives error.

     

    In other way, I have created a new Visual C# 2010 project (solution). Then I have added the files of web pages to my project. Also the Global.asax file. The problem is how to create the database (SQL Server 2008) and his tables.

     

    Thanks,

     

  •  09-25-2012, 11:17 PM 74764 in reply to 74714

    Re: The chat does not works

    Hello


    Have the same issue here. I have purchased Messenger for three days ago. I must integrate it with my existing membership database. But what ever I try no luck with installing it. Please be more complete with the installing stuff. I have put all the new tables in my existing database but it will not integrate with it it's always's asking me to log in, even when I log in as an administrator.

     

    Thanks

  •  09-26-2012, 7:47 AM 74774 in reply to 74764

    Re: The chat does not works

    hi Willemt,

     

    If you need to integrate with your own membership system, please refer to http://cutesoft.net/ASP.NET+Chat/Developer-Guide/scr/DeploymentIntegration.htm, ensure that you have finish all steps there.

     

    Regards,

     

    Ken 

  •  09-26-2012, 2:33 PM 74781 in reply to 74774

    Re: The chat does not works

    Hello Ken,

    Thanks for your reply.

    I have made the Global.asax like below I can login to the admin pages and make a testroom. But when I log in as a user, there is no real testroom. There is a little message with the name testroom but that is not a chatroom.

     

    Must I do something for users now?

     

    SubApplication_Start(ByValsenderAsObject,ByValeAsEventArgs)

           ' Code that runs on application startup

          IfNotRoles.RoleExists("Administrators")Then

               Roles.CreateRole("Administrators")

           EndIf

       

       PrivateSharedCuteChatConnectionStringConfigNameAsString="aspnetdbConnectionString"

     

       PublicFunctionGetConnectionString(reservedAsString)AsString

           ReturnSystem.Configuration.ConfigurationManager.ConnectionStrings(CuteChatConnectionStringConfigName).ConnectionString

       EndFunction

       

       PublicClassAspNetChatProvider

           InheritsChatProvider

           PublicOverridesFunctionGetConnectionString()AsString

               ReturnSystem.Configuration.ConfigurationManager.ConnectionStrings(CuteChatConnectionStringConfigName).ConnectionString

           EndFunction

     

           PublicOverridesFunctionGetLogonIdentity()AsAppChatIdentity

               DimuserAsSystem.Web.Security.MembershipUser= System.Web.Security.Membership.GetUser()

     

               IfuserIsNotNothingAndAlsouser.IsApprovedThen

                   ReturnNewAppChatIdentity(user.UserName,False, ToUserId(user.UserName),HttpContext.Current.Request.UserHostAddress)

               EndIf

     

               ReturnNothing

           EndFunction

     

           PublicOverridesFunctionFindUserLoginName(nickNameAsString)AsString

               DimuserAsSystem.Web.Security.MembershipUser= System.Web.Security.Membership.GetUser(nickName,False)

               IfuserIsNotNothingAndAlsouser.IsApprovedThen

                   Returnuser.UserName

               EndIf

               ReturnNothing

           EndFunction

           PublicOverridesFunctionGetUserInfo(loginNameAsString,ByRefnickNameAsString,ByRefisAdminAsBoolean)AsBoolean

               DimuserAsSystem.Web.Security.MembershipUser= System.Web.Security.Membership.GetUser(loginName,False)

               IfuserIsNotNothingAndAlsouser.IsApprovedThen

                   nickName = user.UserName

                   isAdmin =Roles.IsUserInRole(user.UserName,"Administrators")

                   ReturnTrue

               EndIf

               ReturnFalse

           EndFunction

     

           PublicOverridesFunctionValidateUser(usernameAsString, passwordAsString)AsBoolean

               IfNotSystem.Web.Security.Membership.ValidateUser(username, password)Then

                   ReturnFalse

               EndIf

     

               System.Web.Security.FormsAuthentication.SetAuthCookie(username,False,HttpRuntime.AppDomainAppVirtualPath)

     

               ReturnTrue

           EndFunction

       EndClass

  •  09-27-2012, 7:34 AM 74787 in reply to 74781

    Re: The chat does not works

    Hi,

     

    You can try the example page below, it will get all chat rooms and shows it in the page like demo http://dotnetdate.com/Chat.aspx

     

    1. <%@ Import Namespace="CuteChat" %>  
    2. <%@ Import Namespace="System.Data" %>  
    3. <%@ Import Namespace="System.Data.SqlClient" %>  
    4.   
    5. <%@ Page Language="c#" %>  
    6.   
    7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    8. <html>  
    9. <head>  
    10.     <title>chat room</title>  
    11. </head>  
    12. <body>  
    13.     <form id="Form1" method="post" runat="server">  
    14.         <div class="infobox" style="width: 700px; margin: 30px auto">  
    15.             <h2>  
    16.                 Chat  
    17.             </h2>  
    18.             <div class="padding10">  
    19.                 <table cellspacing="0" border="0" cellpadding="8" style="width: 90%">  
    20.                     <tr>  
    21.                         <td>  
    22.                             <asp:DataList ID="DataList_Lobbies" CellSpacing="3" Width="400" RepeatColumns="2"  
    23.                                 runat="server">  
    24.                                 <ItemTemplate>  
    25.                                     <asp:HyperLink ID="lnkLobby" runat="server">  
    26.                                                             <nobr><img src="images/home.gif" width="49" height="49" border="0" align="middle"><%#DataBinder.Eval(Container.DataItem, "Name")%></nobr>  
    27.                                     </asp:HyperLink>  
    28.                                     <br />  
    29.                                     (  
    30.                                     <asp:Label ID="lblOnlineChater" runat="server"></asp:Label>  
    31.                                     chatting)  
    32.                                 </ItemTemplate>  
    33.                             </asp:DataList>  
    34.                             <asp:Literal ID="Literal1" runat="server" />  
    35.                         </td>  
    36.                         <td>  
    37.                             <img alt="" src="images/cutechat_picture.jpg" height="180" />  
    38.                         </td>  
    39.                     </tr>  
    40.                 </table>  
    41.             </div>  
    42.         </div>  
    43.     </form>  
    44.   
    45.     <script runat="server">  
    46.           
    47.         private void Page_Load(object sender, System.EventArgs e)  
    48.         {  
    49.             if (!this.IsPostBack)  
    50.             {  
    51.                 ArrayList lobbies = new ArrayList();  
    52.                 foreach (LobbyInfo lobby in ChatApi.GetLobbyInfoArray())  
    53.                 {  
    54.                     if (lobby.Lobby.Integration == "" || lobby.Lobby.Integration == null)  
    55.                         lobbies.Add(lobby);  
    56.                 }  
    57.                 this.DataList_Lobbies.DataSource = lobbies;  
    58.                 this.DataList_Lobbies.ItemDataBound += new DataListItemEventHandler(rptLobbies_ItemDataBound);  
    59.                 this.DataList_Lobbies.DataBind();  
    60.             }  
    61.   
    62.             if (CuteChat.ChatApi.GetLobbyInfoArray().Length < 1)  
    63.                 Literal1.Text = "<p style='font-size:14px;'>There is no chat room availables now.<br><br>Please login as admin and create chat rooms in the admin console!</p>";  
    64.         }  
    65.   
    66.   
    67.         private void rptLobbies_ItemDataBound(object sender, DataListItemEventArgs e)  
    68.         {  
    69.             if (e.Item.DataItem == null)  
    70.             {  
    71.                 return;  
    72.             }  
    73.   
    74.             LobbyInfo lobby = (LobbyInfo)e.Item.DataItem;  
    75.             HyperLink lnkLobby = e.Item.FindControl("lnkLobby"as HyperLink;  
    76.             lnkLobby.NavigateUrl = CuteChat.ChatWebUtility.ResolveResource(this.Context, "Channel.Aspx") + "?Place=Lobby-" + lobby.Lobby.LobbyId;  
    77.             lnkLobby.Target = "_blank";  
    78.             String sOnlineChater = lobby.JoinClient(",");  
    79.             Label lblOnlineChater = e.Item.FindControl("lblOnlineChater"as Label;  
    80.             lblOnlineChater.Text = lobby.ClientCount.ToString();  
    81.             lnkLobby.ToolTip = sOnlineChater;  
    82.         }  
    83.   
    84.     </script>  
    85.   
    86. </body>  
    87. </html>  
     

    Regards,

     

    Ken 

  •  09-27-2012, 2:43 PM 74794 in reply to 74787

    Re: The chat does not works

    Hi Ken,

     

    That is what I have tryed. But the translation to VB.Net  gives an error on.

     
     this.DataList_Lobbies.ItemDataBound += new DataListItemEventHandler(rptLobbies_ItemDataBound);  
     to 
     Me.DataList_Lobbies.ItemDataBound += New DataListItemEventHandler(rptLobbies_ItemDataBound)

     

    gives me Error 3208 'Public Event ItemDataBound(sender As Object, e As System.Web.UI.WebControls.DataListItemEventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.

     

    Is there an other way to do this in vb

     

    Thanks

  •  09-28-2012, 7:58 AM 74815 in reply to 74794

    Re: The chat does not works

    Hi Willemt,

     

    Please try the example below. It is the vb.net example.

     

    1. <%@ Page Language="VB" %>  
    2. <%@ Import Namespace="System.Data" %>  
    3. <%@ Import Namespace="System.Data.SqlClient" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5.   
    6. <script runat="server">  
    7.     Private Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs)  
    8.         If Not Me.IsPostBack Then  
    9.             Dim lobbies As ArrayList = New ArrayList  
    10.             For Each lobby As CuteChat.LobbyInfo In CuteChat.ChatApi.GetLobbyInfoArray  
    11.                 If ((lobby.Lobby.Integration = "") _  
    12.                             OrElse (lobby.Lobby.Integration Is Nothing)) Then  
    13.                     lobbies.Add(lobby)  
    14.                 End If  
    15.             Next  
    16.             Me.DataList_Lobbies.DataSource = lobbies  
    17.             AddHandler Me.DataList_Lobbies.ItemDataBound, AddressOf Me.rptLobbies_ItemDataBound  
    18.             Me.DataList_Lobbies.DataBind()  
    19.         End If  
    20.         If (CuteChat.ChatApi.GetLobbyInfoArray.Length < 1) Then  
    21.             Literal1.Text = "<p style='font-size:14px;'>There is no chat room availables now.<br><br>Please login as admin and cre" & _  
    22.             "ate chat rooms in the admin console!</p>"  
    23.         End If  
    24.     End Sub  
    25.       
    26.       
    27.     Private Sub rptLobbies_ItemDataBound(ByVal sender As ObjectByVal e As DataListItemEventArgs)  
    28.         If (e.Item.DataItem Is NothingThen  
    29.             Return  
    30.         End If  
    31.         Dim lobby As CuteChat.LobbyInfo = CType(e.Item.DataItem, CuteChat.LobbyInfo)  
    32.         Dim lnkLobby As HyperLink = CType(e.Item.FindControl("lnkLobby"), HyperLink)  
    33.         lnkLobby.NavigateUrl = (CuteChat.ChatWebUtility.ResolveResource(Me.Context, "Channel.Aspx") & ("?Place=Lobby-" & lobby.Lobby.LobbyId))  
    34.         lnkLobby.Target = "_blank"  
    35.         Dim sOnlineChater As String = lobby.JoinClient(",")  
    36.         Dim lblOnlineChater As Label = CType(e.Item.FindControl("lblOnlineChater"), Label)  
    37.         lblOnlineChater.Text = lobby.ClientCount.ToString  
    38.         lnkLobby.ToolTip = sOnlineChater  
    39.     End Sub  
    40. </script>  
    41.   
    42. <html xmlns="http://www.w3.org/1999/xhtml" >  
    43. <head runat="server">  
    44.     <title>chat room</title>  
    45. </head>  
    46. <body>  
    47.     <form id="form1" runat="server">  
    48.    <div class="infobox" style="width: 700px; margin: 30px auto">  
    49.             <h2>  
    50.                 Chat  
    51.             </h2>  
    52.             <div class="padding10">  
    53.                 <table cellspacing="0" border="0" cellpadding="8" style="width: 90%">  
    54.                     <tr>  
    55.                         <td>  
    56.                             <asp:DataList ID="DataList_Lobbies" CellSpacing="3" Width="400" RepeatColumns="2"  
    57.                                 runat="server">  
    58.                                 <ItemTemplate>  
    59.                                     <asp:HyperLink ID="lnkLobby" runat="server">    
    60.                                                             <nobr><img src="images/home.gif" width="49" height="49" border="0" align="middle"><%#DataBinder.Eval(Container.DataItem, "Name")%></nobr>    
    61.                                     </asp:HyperLink>  
    62.                                     <br />  
    63.                                     (  
    64.                                     <asp:Label ID="lblOnlineChater" runat="server"></asp:Label>  
    65.                                     chatting)  
    66.                                 </ItemTemplate>  
    67.                             </asp:DataList>  
    68.                             <asp:Literal ID="Literal1" runat="server" />  
    69.                         </td>  
    70.                         <td>  
    71.                             <img alt="" src="images/cutechat_picture.jpg" height="180" />  
    72.                         </td>  
    73.                     </tr>  
    74.                 </table>  
    75.             </div>  
    76.         </div>  
    77.     </form>  
    78. </body>  
    79. </html>  
     

    Regards,

     

    Ken 

  •  10-02-2012, 3:32 AM 74835 in reply to 74815

    Re: The chat does not works

    Hello Ken:

    For integrate the CuteChat library in my project,

    What must I import (VB 2010)?

    What  libraries must I copy in bin folder?

    What another copies must I do to my own project?

    I have not buy the CuteChat yet, but I want to do it if my try version works.

    Thanks,

     

  •  10-04-2012, 2:59 AM 74853 in reply to 74835

    Re: The chat does not works

    Dear Armand66,

     

    For your VB2010 project,

    1. You need to  copy CuteChat.AppCode.dll,CuteChat.dll,CuteChat.lic,CuteMessenger.lic to bin folder,

     then copy CuteSoft_Client folder to the root path of your project

     

    2. Create a provider based on your site's membership, details from http://cutesoft.net/forums/permalink/74835/74781/ShowThread.aspx#74781

     

    3.  Run the CutechatStandalone.sql sql scripts in the SQL 2008 Database of your site.

     

    Regards,

    Jeff 

  •  10-05-2012, 2:08 AM 74864 in reply to 74853

    Re: The chat does not works

    Now that I run the standalone file and have created the tables in SQL DataBase "master" and copy them to "LoquitoChat.mdf"...

    How can I connect to the tables of the DadaBase?

  •  10-05-2012, 2:55 AM 74865 in reply to 74864

    Re: The chat does not works

    Create a user for LoquitoChat as dbo role in SQL client management tool.

     

    Then modify the web.config 

    <add key="ConnectionString" value="server=(local);database=LoquitoChat;uid=DBUserName;pwd=DBUserPassword"/> 

     

    Regards,

    Jeff 

  •  10-05-2012, 10:58 AM 74870 in reply to 74865

    Re: The chat does not works

    No se ha inicializado la propiedad ConnectionString. = The ConnectionString property is not initialized.

     

    How can I resolved this matter in VB 2010?

    I am running "chat.aspx" file. 

    I have write a ConnectionString for my SQL DataBase "LoquitoChat.mdf" in Web.Config file. 

    <add name="LoquitoChatConnectionString" connectionString="Data Source=(local);Initial Catalog=LoquitoChat;Integrated Security=True" providerName="System.Data.SqlClient" />

    The line whit the advice is the follow:

    foreach(LobbyInfo lobby in ChatApi.GetLobbyInfoArray()) 

    Thanks,

     

  •  10-08-2012, 1:16 AM 74902 in reply to 74870

    Re: The chat does not works

    For the connectionstring, you need copy my last post to appSettings node of web.config

     

    the C# code to VB is below  

    1. For Each lobby As LobbyInfo In ChatApi.GetLobbyInfoArray()  
    2. Next  
     

     

    Regards,

    Jeff 

  •  10-08-2012, 6:19 AM 74907 in reply to 74902

    Re: The chat does not works

    What does it means "ChatSystem not installed"?

    It appears in the follow line

    foreach (LobbyInfo lobby in  ChatApi.GetLobbyInfoArray()) 

    in the "chat.aspx" file that I want to run or debug.

    Thanks,

     

    I have prepared the Global.asax file line in post 74781 (of Willemt).

     

     

  •  10-08-2012, 9:29 AM 74913 in reply to 74907

    Re: The chat does not works

    HI Armand66,

     

    I think you have not finishe the step 4 section B in the Global.asax.

     

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

    CuteChat.ChatProvider.Instance = new MyChatProvider();
    CuteChat.ChatSystem.Start(new CuteChat.AppSystem());
     

    You an start it like bleow in Global.asax

     

    1. Public Overrides Sub Init()  
    2.     MyBase.Init()  
    3.   
    4.     SyncLock GetType(CuteChat.ChatSystem)  
    5.         If Not CuteChat.ChatSystem.HasStarted Then  
    6.             CuteChat.ChatProvider.Instance = New AspNetChatProvider()  
    7.             CuteChat.ChatSystem.Start(New CuteChat.AppSystem())  
    8.         End If  
    9.     End SyncLock  
    10. End Sub  
     

    Regards,

     

    Ken 

  •  10-14-2012, 3:22 AM 74977 in reply to 74913

    Re: The chat does not works

    How can I sign in as admin?

    I need to create chatrooms and lobbies.

    Thanks,

     

  •  10-15-2012, 10:02 AM 74987 in reply to 74977

    Re: The chat does not works

    Hi Armand66,

     

    The chat admin is defined by the method below.  

    1. PublicOverridesFunctionGetUserInfo(loginNameAsString,ByRefnickNameAsString,ByRefisAdminAsBoolean)AsBoolean  
    2.           DimuserAsSystem.Web.Security.MembershipUser= System.Web.Security.Membership.GetUser(loginName,False)  
    3.           IfuserIsNotNothingAndAlsouser.IsApprovedThen  
    4.               nickName = user.UserName  
    5.               isAdmin =Roles.IsUserInRole(user.UserName,"Administrators")  
    6.               ReturnTrue  
    7.           EndIf  
    8.           ReturnFalse  
    9.       EndFunction  

    You set isAdmin =Roles.IsUserInRole(user.UserName,"Administrators") , so just need to login your site as 'Administrators' user, and go to the chat admin page http://yoursite/CuteSoft_Client/CuteChat/ChatAdmin/.

     

    By the way, step 6 in http://cutesoft.net/ASP.NET+Chat/Developer-Guide/scr/DeploymentIntegration.htm shows you how to create the chat admin link.

     

    Regards,

     

    Ken 

Page 1 of 2 (22 items)   1 2 Next >
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems