Messenger Configuration

  •  03-14-2008, 11:22 AM

    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
View Complete Thread