Messenger Configuration

Last post 03-18-2008, 1:48 PM by Adam. 3 replies.
Sort Posts: Previous Next
  •  03-14-2008, 11:22 AM 37975

    Messenger Configuration

    I have managed to get Cute Chat 4.1 working correctly, however I am still having some trouble with the messenger setup.
    I think I may at least understand the problem but I am not sure how to correct it.
     
    I noticed the chatprovider is making use of forms authentication however my application does not use this.
     
    I have changed my VB version of the chatprovider to read:
    ___________________________________________________________________________________________

    Imports Microsoft.VisualBasic
    Imports usersclass

     Public Class chatprovider
        Inherits CuteChat.ChatProvider
        Public Function GetLogonUser()
             Dim username As String = CurrentUser.UserName
                 Return username
        End Function

        Public Overrides Function GetConnectionString() As String
            Return System.Configuration.ConfigurationManager.ConnectionStrings("CuteChat").ConnectionString
        End Function

        Public Overrides Function GetLogonIdentity() As CuteChat.AppChatIdentity
          Return New CuteChat.AppChatIdentity(CurrentUser.UserName.ToString.ToUpper, False, CurrentUser.UserId.ToString, CurrentUser.UserId.ToString)
        End Function

        Public Overrides Function GetUserInfo(ByVal loginName As String, ByRef nickName As String, ByRef isAdmin As Boolean) As Boolean
            If CurrentUser.UserName.ToString = "admin" Then
                isAdmin = True
                Return True
            Else
                isAdmin = False
                Return True
            End If
        End Function

        Public Overrides Function FindUserLoginName(ByVal nickName As String) As String
            Try
                    Return CurrentUser.UserName
              Catch ex As Exception
                Return Nothing
            End Try
        End Function

        Public Overrides Function ValidateUser(ByVal loginName As String, ByVal password As String) As Boolean
            Return True
        End Function
    End Class
    __________________________________________________________________________________________________
    I have setup a test page that has:
     

    <script src="chat/IntegrationUtility.js.aspx"></script>     
       
    <a href="#" onclick="Chat_OpenContact('9Y3OQWZ3TD')"><img src="chat/Images/avatar.gif" />9Y3OQWZ3TD</a>
     
    ___________________________________________________________________________________________________

    Now two users login to the website.
     
    One called - 9Y3OQWZ3TD
    and the other one called - RUI4QBQ3CW
     
    Now the user RUI4QBQ3CW navigates to the testpage and clicks the link above and gets this:
     


    Notice in the above window it shows the person RUI4QBQ3CW is trying to contact as "Non Contact" if I attempt to manually add the contact it adds it but it shows them as being off-line.
     
    The fact that Cute Chat is working leads me to believe my setup is correct but I think it has more to do with forms authentication or something that is not telling messenger this person is logged in.
     
    or maybe I am totally wrong but in either case it does not work for me and I need some help solving the problem. Please have a look at my chatproiver and let me know if I am missing something that meessenger needs to make this work correctly.
     
    Thanks
    - Paul
  •  03-17-2008, 12:01 PM 38048 in reply to 37975

    Re: Messenger Configuration

    Paul,
     
    1.
     
    Can you change the following code:
     
    Return New CuteChat.AppChatIdentity(CurrentUser.UserName.ToString.ToUpper, False, CurrentUser.UserId.ToString, CurrentUser.UserId.ToString)
     
    to:
     
     Return New CuteChat.AppChatIdentity(CurrentUser.UserName.ToString.ToUpper, False, CurrentUser.UserId.ToString, HttpContext.Current.Request.UserHostAddress)
     
    2.
     
    Can you make sure 9Y3OQWZ3TD and RUI4QBQ3CW log in the web messenger and try again?
     
    3. If the target user has not been added into the contact list,  the "No Contact" will be displayed.
     
     
     

    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

  •  03-18-2008, 1:28 PM 38106 in reply to 38048

    Re: Messenger Configuration

    "1.
     
    Can you change the following code:
     
    Return New CuteChat.AppChatIdentity(CurrentUser.UserName.ToString.ToUpper, False, CurrentUser.UserId.ToString, CurrentUser.UserId.ToString)
     
    to:
     
     Return New CuteChat.AppChatIdentity(CurrentUser.UserName.ToString.ToUpper, False, CurrentUser.UserId.ToString, HttpContext.Current.Request.UserHostAddress)"
     
    This has no effect at all.
     
     
     
    "2.
     
    Can you make sure 9Y3OQWZ3TD and RUI4QBQ3CW log in the web messenger and try again?"
     
    When each user logged in to two seperate computers the reults are the same. It does not work.
     
    "3. If the target user has not been added into the contact list,  the "No Contact" will be displayed."
     
    Ok if "No Contact" is displayed does that mean the contact will need to be added before they can chat?
     
     
  •  03-18-2008, 1:48 PM 38107 in reply to 38106

    Re: Messenger Configuration

    watchmyhousesell,
     
    if(user A wants to send a message to user B)
    {
       if (user B is online)
       {
          if (user B is on user A contact list)
          {
             A conversation is started.
             
          }
          else
          {         
             
             A conversation is started. However we added a "no contact" sign near to user's avatar.

             
     
          }
       }
       else
       {
          The message will be sent as an offline message
       }
     
    }

    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

View as RSS news feed in XML