Want to check for operator client and user client in global.asax

  •  07-15-2010, 10:16 AM

    Want to check for operator client and user client in global.asax

     I wanted to check the operator client and user client in global.asax so when i debug in asp.net code i saw it hit "GetLogonIdentity()" function in global.asax but not able to write the condition so that i can check which one is from operator client and which one is user client so can you plz tell me what would be the reference gunction for operator client for "GetLogonIdentity()"  and what is the file name..wanted to write
     GetLogonIdentity() in global.asax given below
     
     
    Public Overrides Function GetLogonIdentity() As AppChatIdentity
    Dim Context As HTTPContext= HTTPContext.Current
    If context IsNot Nothing Then

    Dim loginName As String = context.User.Identity.Name
                    Dim cachekey As String = "NickName:" & loginName
                    Dim userid As String = ToUserId(loginName)
                    Dim nickName As String = Nothing
                    If Not context Is Nothing Then
                        Dim myLoggedInUser As String = ""
                        Try
                            myLoggedInUser = context.Request.Cookies("LoggedInUser").Value
                        Catch ex As Exception

                        End Try

    If myLoggedInUser <> "" Then
                            '                got user id from cookie
                            Return New AppChatIdentity(myLoggedInUser, False, myLoggedInUser, context.Request.UserHostAddress)
                        Else
                            ' try to get userid from web
                            myLoggedInUser = getLoggedInUser(context)
                            If Not myLoggedInUser Is Nothing AndAlso myLoggedInUser <> "" Then
                                Return New AppChatIdentity(myLoggedInUser, False, myLoggedInUser, context.Request.UserHostAddress)
                            End If
                        End If
                    End If
                    'Dim exists As Boolean = GetUserInfo(loginName, nickName)
                    'If Not exists Then
                    '    Return Nothing
                    'End If

                    'Return New AppChatIdentity(myLoggedInUser, False, myLoggedInUser, context.Request.UserHostAddress)
                    'End If
                End If
    Return Nothing
    End Function
View Complete Thread