Messenger users always Appear ofline

Last post 09-05-2008, 9:41 AM by aborg. 6 replies.
Sort Posts: Previous Next
  •  07-21-2008, 1:20 AM 42390

    Messenger users always Appear ofline

    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

  •  07-21-2008, 3:00 PM 42410 in reply to 42390

    Re: Messenger users always Appear ofline

  •  07-21-2008, 11:39 PM 42417 in reply to 42410

    Re: Messenger users always Appear ofline

    Thanks Adam for replying my Problem :-
     
    I not using anything like Load Balancing. Even I checked your stand alone package and it was working fine on my system. But as i want to integrate with my existing Asp.net 2.0 Application. I am having problem. I request you to please check my ChatProvider once, i think i am missin somethin in that only.

    Waiting for Response.
     
    Thanks
    Prashant 
  •  07-22-2008, 12:21 AM 42420 in reply to 42417

    Re: Messenger users always Appear ofline

    Hi,
     
    I don't find problem from your code.
     
    Maybe there's some error while the messenger running.
     
    Can the Messenger UI login , and send an offline message to others ?
     
    Regards , Terry .
  •  07-22-2008, 4:31 AM 42429 in reply to 42420

    Re: Messenger users always Appear ofline

    hi Terry ,
     
    As i am integrating with my existing DB. My asp.net application authenticate users and by chat provider i provider users credentials to Messenger and users are able to Login and are able to Add contacts from my db, Even they are able to send offline messages. Following is snap shot. Only Problem still exists is they never become ONLINE.
     
  •  07-23-2008, 5:52 AM 42465 in reply to 42429

    Re: Messenger users always Appear ofline

    hi All,
     
    I was finally able to figure out the issue. In integration guide it was not mentioned that in provider chatidentity , while providing user loginname , we need to add "USER:" & Loginname.
     
    when i modified my code from
     

    Dim empcode As String = HttpContext.Current.Session("USER_EMP_CODE").ToString

     
    to
     

    Dim empcode As String = "User:" & HttpContext.Current.Session("USER_EMP_CODE").ToString

     
    it worked for me .
     
     
    Thanks ADAM , TERRY
     
     
  •  09-05-2008, 9:41 AM 43647 in reply to 42465

    Re: Messenger users always Appear ofline

    I am having the same problem. Could you post the part of your code where this is needed so i can get a better idea of what you did?

View as RSS news feed in XML