Citrix Server VDI : Failed to start wcf services. Exception object reference not set to an instance of an object

Citrix Server VDI : Failed to start wcf services. Exception object reference not set to an instance of an object

book

Article ID: CTX220881

calendar_today

Updated On:

Description

The Citrix Desktop Service failed to initialize communication services required for interaction between this machine and delivery controllers.

If the problem persists please perform a ‘repair’ install action or reinstall the Citrix Virtual Desktop Agent. 

Error details:

Failed to start WCF services. Exception ‘Object reference not set to an instance of an object.’ of type ‘System.NullReferenceException’

Resolution

  • Make sure that under HKCR\Interface\{BEE5F9CD-A777-47C7-BA5A-CDD82FFEC4D8}\TypeLib(Default) is set to {9A0B1570-B01D-4196-BDC9-4CE132108BA6}, and the value is accessible.
  • Make sure that under HKCR\TypeLib\{9A0B1570-B01D-4196-BDC9-4CE132108BA6}\1.0\0\win32(Default) is set to C:\Program Files\Citrix\ICAService\StackControlInterop.tlb, and the value is accessible.
  • Make sure the file C:\Program Files\Citrix\ICAService\StackControlInterop.tlb exists, and is accessible.
  • If under HKCR\TypeLib\{9A0B1570-B01D-4196-BDC9-4CE132108BA6}\1.0\0 a value win64 exists, delete it.

Problem Cause

The following System.InvalidCastException is thrown as BrokerAgent starts up, creates our StartWorkerAgentThread, Initializes LaunchManager, and attempts to ConnectToStackControlCOMServer:

COM exception System.InvalidCastException: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘Citrix.StackControlService.StackControl’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{BEE5F9CD-A777-47C7-BA5A-CDD82FFEC4D8}’ failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

This is caused either by a missing StackController type library or by incorrect registry entries relating to the same.

Issue/Introduction

Failed to start WCF services. Exception ‘Object reference not set to an instance of an object.’ of type ‘System.NullReferenceException’