ahammoud

COM object that has been separated from its underlying RCW cannot be used

Discussion created by ahammoud Employee on Nov 9, 2009
Latest reply on Aug 28, 2018 by gregor

When I connect to the PI Server from within my AF DR, I started to get this error (call where made from scheduled AR with ACE:

COM object that has been separated from its underlying RCW cannot be used

 

AF 2.1 and ACE 2.1.32 on same server
PIServer 3.4.375.80
Both running on W2K3 server

 

I use the following code:

Dim sdkDlg As New PISDKDlg.Connections
    Try
      piServer = piServerMgr.PISDK.Servers(servername)
      If Not piServer.Connected Then
        piServer = sdkDlg.Login(piServer, String.Empty, String.Empty, False, False)
        sdkDlg = Nothing
      End If
      Return piServer.Connected
    Catch ex As Exception
      _lastErrorMessage = ex.ToString
      EventLog.WriteEntry("PIPOINTADV Connection Error", String.Format("Connection to server {0} failed. Error[{1}]", servername, _lastErrorMessage))
      Throw New ApplicationException(String.Format("Connection to server {0} failed.", servername))
    End Try

Outcomes