Alex
Alex

Reputation: 549

System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'System.EnterpriseServices.IRemoteDispatch'

I get the error given in the title when moving a Cluster Role.

I have a Windows Failover Cluster on two nodes with Windows Server 2019:

enter image description here

I have the Windows Service "FTS MasterConsole Online CY" as a Cluster Resource. This service, calls upon start the COM+ method FTS.DataAccess.CORE.UserAccess.LogonU.Logon:

        oUA = New DataAccess.CORE.UserAccess.LogonU
        WriteLog("Form1_Load Logon begin")
        dsUserInfo = oUA.Logon(UserName, curIPAdd.ToString, False, True)

The LogonU class is in the COM+ application FTS and implements the IRemoteDispatch interface:

enter image description here

When I move the Cluster Role to the other node and the COM+ process (dllhost.exe) of the FTS Application is not running on the other node, the move succeeds. It correctly starts the COM+ process on the other node. However when the COM+ process (dllhost.exe) of the FTS Application is running on the other node, the move fails with the following error in the EventViewer:

WinServiceOnline System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'System.EnterpriseServices.IRemoteDispatch'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6619A740-8154-43BE-A186-0319578E02DB}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
   at System.EnterpriseServices.RemoteServicedComponentProxy.Invoke(IMessage reqMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at FTS.DataAccess.CORE.UserAccess.LogonU.Logon(String Username, String IPAddress, Boolean chckAlreadyLoggedOn, Boolean blnUpdateUserLoginInfo)
   at FTS.Services.WindowsServices.CORE.MasterConsoleServer.WCFService.LogOn()
   at FTS.Services.WindowsServices.CORE.MasterConsoleServer.WCFService.Init()
   at FTS.Services.WindowsServices.CORE.MasterConsoleServer.WinService.StartMC()
Additional Info:
MachineName: ABCYFTS201T
TimeStamp: 21/10/2024 3:13:12 μ.μ.
FullName: FTS.Common.Libraries.CORE.ExceptionHandling, Version=2.0.0.0, Culture=neutral, PublicKeyToken=951855d69736a7a2
WindowsIdentity: ALPHABANK\zzbmastercom

Do you have an idea, why this happens? The Windows Service, as well as the COM+ component are written in VB.NET 4.7.

Upvotes: 0

Views: 26

Answers (0)

Related Questions