Hi All,
I am working hard for making Cute messenger to be integrated with my existing DB (Asp.net Application ).
Please help.
I was finally Able to add/remove contacts from db. But I am stucked at Problem ---- USERS ALWAYS APPEAR OFFLINE.
Even I checked deploying application on server .
Following is my chat provider class
Imports
Microsoft.VisualBasic
Imports
CuteChat
Namespace
MYPROG
Public Class MMSCHATPROVIDER
Inherits CuteChat.ChatProvider
Public Function GetLogonUser()
Dim username As String = HttpContext.Current.Session("DisplayFirstName").ToString
Return username.ToUpper
End Function
Public Overrides Function GetConnectionString() As String
Dim gstrconnstr As String = System.Configuration.ConfigurationSettings.AppSettings("strCon")
Return gstrconnstr
End Function
Public Overrides Function GetLogonIdentity() As CuteChat.AppChatIdentity
Dim dispname As String = HttpContext.Current.Session("DisplayFirstName").ToString
Dim empcode As String = HttpContext.Current.Session("USER_EMP_CODE").ToString
Return New CuteChat.AppChatIdentity(dispname.ToUpper, False, empcode, HttpContext.Current.Request.UserHostAddress)
End Function
Public Overrides Function GetUserInfo(ByVal loginName As String, ByRef nickName As String, ByRef isAdmin As Boolean) As Boolean
' Dim dispname As String = HttpContext.Current.Session("DisplayFirstName").ToString
'nickName = dispname
'---------prashant == trying to find loggin name from the db from parameter nickname
Dim myobj As New ClsUtility
Dim clsutilobj As New ClsUtility
Dim clsinsobj As New clsTableInsertUpdate
Dim no As Integer
Dim ldatarow As DataRow
ldatarow = myobj.RetrieveRecord2(
"FetchUserLoggName", "emp_code='" & loginName & "'")
nickName = ldatarow(
"Emp_First_Name").ToString.ToUpper
Return True
End Function
Public Overrides Function FindUserLoginName(ByVal nickName As String) As String
'---------prashant == trying to find loggin name from the db from parameter nickname
Dim myobj As New ClsUtility
Dim clsutilobj As New ClsUtility
Dim clsinsobj As New clsTableInsertUpdate
Dim no As Integer
Dim ldatarow As DataRow
ldatarow = myobj.RetrieveRecord2(
"FetchUserLoggName", "Emp_First_Name='" & nickName & "'")
If IsDBNull(ldatarow("emp_code")) And ldatarow("emp_code") Is Nothing Then
Return Nothing
Else
Return ldatarow("emp_code")
End If
End Function
Public Overrides Function ValidateUser(ByVal loginName As String, ByVal password As String) As Boolean
Return True
End Function
End Class
End
Namespace