Showing posts with label open text. Show all posts
Showing posts with label open text. Show all posts

Tuesday, March 28, 2017

Open Text DM API Login Failed For Library

login function used to login dm Library

Public Function HB_Login(ByVal library As String, ByVal username As String, ByVal password As String) As String

        Dim DST As String
        Try

            plgn = New PCDLogin()
            plgn.AddLogin(0, library, username, password)
            plgn.Execute()
            If plgn.ErrNumber <> 0 Then
                plgn = Nothing
                Return "ERROR"
            End If
            DST = plgn.GetDST
            plgn = Nothing

        Catch ex As Exception
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex)
        End Try
        Return DST
    End Function



Error Message (From Debugging )
Cannot load the DM Server interface.  The DM server may not be started.
plgn.ErrNumber -2147220409

Solution:

the problem was in Network connection for DCom Protocol - may be the antivirus or firewall program block the protocol for DM Connection Wizard.

when i changed the Connection to DM Server to Http Protocol The code running successfully.

i