Unable tocast COM object to interface type ‘System.EnterpriseServices.IRemoteDispatcher
When moving a Cluster Role, I get the error:
System.InvalidCastException: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘System.EnterpriseServices.IRemoteDispatch’
I have a Windows Failover Cluster on two nodes with Windows Server 2019:
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:
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: ALPHABANKzzbmastercom
Do you have an idea, why this happens? The Windows Service, as well as the COM+ component are written in VB.NET 4.7.
When moving a Cluster Role, I get the error: System.InvalidCastException: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘System.EnterpriseServices.IRemoteDispatch’ I have a Windows Failover Cluster on two nodes with Windows Server 2019: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: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: ALPHABANKzzbmastercom Do you have an idea, why this happens? The Windows Service, as well as the COM+ component are written in VB.NET 4.7. Read More