SOLVED Chat client can't see any online users and doesn't appear to send messages

  •  02-13-2012, 9:09 AM

    SOLVED Chat client can't see any online users and doesn't appear to send messages

    Hi,
     
    A client is wanting a chat system for their intranet that we have developed (uses asp.net / windows authentication). We have decided to use this software however after spending several hours trying to configure it to work with the windows authentication system, I am at a stand still. I have used the documentation and read the support forums but am still having problems.
     
    I've overridden the functions as decribed in the global.asax file and it is picking up that I am logged in (with my windows login name). The problem is when testing it with multiple users. Basically if I log in as "A" and add "B"  as a friend, then log in on another machine as "B", "A" still says "B" is offline and vice versa. Similarly if I send a message from "A" to "B", "B" never receives that message, and again vice versa. I can see in the database that the messages have been added though.
     
    It's as though the system doesn't know that "A" or "B" is online despite being logged in as them.
     
    Please find below my override functions (in global.asax):
     
    **************************************************
     
         Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
            '// CUTESOFT CHAT
            SyncLock GetType(CuteChat.ChatSystem)
                If Not CuteChat.ChatSystem.HasStarted Then
                    CuteChat.ChatProvider.Instance = New AspNetChatProvider()
                    CuteChat.ChatSystem.Start(New CuteChat.AppSystem())
                End If
            End SyncLock
        End Sub
     
    #Region "CutesoftChat"
        Private Shared CuteChatConnectionStringConfigName As String = "dbconn"

        Public Function GetConnectionString(ByVal reserved As String) As String
            Return System.Configuration.ConfigurationManager.ConnectionStrings(CuteChatConnectionStringConfigName).ConnectionString
        End Function

        Public Class AspNetChatProvider
            Inherits ChatProvider
            Public Overrides Function GetConnectionString() As String
                Return System.Configuration.ConfigurationManager.ConnectionStrings(CuteChatConnectionStringConfigName).ConnectionString
            End Function

            Public Overrides Function GetLogonIdentity() As AppChatIdentity
                Return New AppChatIdentity(HttpContext.Current.User.Identity.Name, False, HttpContext.Current.User.Identity.Name, HttpContext.Current.Request.UserHostAddress)
            End Function

            Public Overrides Function FindUserLoginName(ByVal nickName As String) As String
                Return nickName
            End Function

            Public Overrides Function GetUserInfo(ByVal loginName As String, ByRef nickName As String, ByRef isAdmin As Boolean) As Boolean
                'loginName = loginName
                'nickName = loginName
                'isAdmin = True
                Return True
            End Function

            Public Overrides Function ValidateUser(ByVal username As String, ByVal password As String) As Boolean
                Return True
            End Function
        End Class

    #End Region
     
    **************************************************
     
    Here's the data for the "CuteChat4_InstantMessage" table from a message I sent:
     
    8 13/02/2012 16:35:05 JADESERVER01\webguest JADESERVER01\webguest JADESERVER01\Administrator User:jadeserver01\administrator 1 NULL NULL 192.168.1.101 hi! <div  >hi!</div>
     
    ************************************************
     
     
     
    Can anyone help??
     
    Thanks in advance!
View Complete Thread