Does the password need to be encrypted to something before being converted to bytes? Using a packet sniffer I can tell that the password isn't being sent by my program is not the same as the Operator Console. The following gives me "Incorrect username or password." when I use the same login information as I do when using the SightMax console.
Private Sub btnOperator_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOperator.Click
Dim OpClient As RemotedOperatorClient = New RemotedOperatorClient()
Dim OpAgentSharedData As SightMax.OperatorAgentSharedData
Dim accountName As String = "SAME AS SIGHTMAX OPERATOR CONSOLE"
Dim userName As String = "SAME AS SIGHTMAX OPERATOR CONSOLE"
Dim encoding As New System.Text.ASCIIEncoding()
Dim password() As Byte = encoding.GetBytes("SAME AS SIGHTMAX OPERATOR CONSOLE")
Dim initialDataSpool As SightMax.SyncDataSpool = New SightMax.SyncDataSpool
Dim sid As SightMax.SecurityIdentifier = New SightMax.SecurityIdentifier
Dim serverVersion As System.Version = New System.Version
Dim accountCannedResponses As SightMax.CannedResponseSharedDataCollection = New SightMax.CannedResponseSharedDataCollection
Dim accountCannedResponseAssociations As SightMax.AccountCannedResponseAssociationCollection = New SightMax.AccountCannedResponseAssociationCollection
Dim operatorCannedResponses As SightMax.CannedResponseSharedDataCollection = New SightMax.CannedResponseSharedDataCollection
Dim operatorCannedResponseShortcuts As SightMax.CannedResponseSharedDataCollection = New SightMax.CannedResponseSharedDataCollection
Dim operatorTimeoutSeconds As Integer
Dim previouslyLoggedIn As Boolean
Dim whiteboxversion As Boolean
Dim guiVersion As System.Version = New Version(6, 0, 0, 0)
Try
OpAgentSharedData = OpClient.Login(initialDataSpool, sid, _
serverVersion, accountCannedResponses, _
accountCannedResponseAssociations, operatorCannedResponses, _
operatorCannedResponseShortcuts, operatorTimeoutSeconds, _
previouslyLoggedIn, whiteboxversion, guiVersion, userName, _
password, accountName)
Catch ex As Exception
Debug.Print(ex.Message)
End Try
End Sub
Hi Dan,
I posted a C# example of logging in here:
http://cs.sightmax.com/forums/p/413/7383.aspx#7383
Let me know if you need a little more.