Deployment / Communications Agent failed to contact the Management Server. Error '500'

Version 2

    Verified Product Versions

    AppSense Management Center 8.7AppSense Management Center 8.6AppSense Management Center 8.5


    When polling the Management Server, the Client Communications Agent (CCA), or Deployment Agent in later releases, may update it's poll time, but remain with a "Deployed (%)" status of 0% within the Management Console and log the following error in the Application Event Log of the affected client:

    Log Name:      Application
    Source:        AppSense Client Communications Agent
    Event ID:      9750
    Level:         Error
    The Deployment Agent failed to contact the Management Server. Error '500'.

    Checking the event logs on the Management Server shows one or more events similar to the below (this has been truncated slightly), logged at the same time as the client received the error 500:

    Log Name:      Application
    Source:        ASP.NET 4.0.30319.0
    Event ID:      1309
    Task Category: Web Event
    Level:         Warning
    Keywords:      Classic
    User:          N/A
    Event code: 3005  Event message: An unhandled exception has occurred.  Event time: dd/mm/yyyy hh:mm:ss  Event ID: 7b9afa6849ca4d7d875331574686562b  Event sequence: 26  Event occurrence: 1  Event detail code: 0    Application information:
         Application domain: /LM/W3SVC/1/ROOT/ManagementServer/Deployment-1-130899860234261398
          Trust level: Full
          Application Virtual Path: /ManagementServer/Deployment
          Application Path: C:\Program Files\AppSense\Management Center\Server\Web Site\Deployment\
          Process name: w3wp.exe
          Account name: NT AUTHORITY\NETWORK SERVICE
        Exception information:      Exception type: NullReferenceException      Exception message: Object reference not set to an instance of an object.
       at Deployment.Manifest.CreateOrUpdateMachinePackageRow(Guid machineKey, List`1 ccaPackages, PLATFORM requestPlatform, MachinePackagesDataSet machinePackages, GroupPackagesDataSet groupPackages, PackagesDataSet packages)
       at Deployment.Manifest.ModifyMachinePackages(Guid machineKey, Boolean isPendingDeletion, Boolean isDeployingNativeConfigs, PLATFORM requestPlatform, List`1 ccaPackages, PackagesDataSet packages, GroupPackagesDataSet groupPackages, MachinePackagesDataSet machinePackages)
       at Deployment.Manifest.SetMachinePackages(Guid machineKey, Guid groupKey, Boolean isPendingDeletion, Request request, Boolean isDeployNativeConfigs)


    This error occurs when Windows Installer is unable to correctly enumerate all installed AppSense products (Agents, Patches and msi-based Configurations).

    When the client enumerates the installed packages, it uses a number of Windows Installer API's that in turn rely on a number of items, including registry data and the Installer cache files (%systemroot%\Installer).

    If registry information is missing or incomplete / corrupt, or one of the required Installer cache files is missing, Windows Installer may return null values which the agent then passes in its manifest XML to the Management Server, which throws a null reference exception when reading the XML and subsequently returns an Error 500 as it cannot determine what actions (if any) are required.

    To remedy this issue, you will need to identify the missing / corrupt Windows Installer details, however, the simplest solution is usually to remove any AppSense products from the client, and let the CCA re-install them, which will correct the missing information.


    A script has been written which can assist with this process, however, it should be made clear that this isn't really an AppSense issue - the problem more likely stems from using customised MSI's and/or multiple software deployment solutions which may reconfigure products or cause reboots whilst installations are performed by another solution.

    This should be run via cscript.exe from an elevated (admin) command prompt. It will write a logfile to (by default), C:\Temp\AppSenseInstalls.log, and is modified from a script provided by Microsoft (

    See Attachment : (below)

    For each product, you'll get an output such as the below - in the example below, no errors were found and so nothing requires fixing. If errors are found, these are detailed and give suggestions on how to fix the issue:


    25/01/2016    10:53:26    ================================================================================
    25/01/2016    10:53:26    Details from: Installer\Products\63F9C9484144CA84285EF1A14BC8FD23
    25/01/2016    10:53:26    PRODUCT NAME   : AppSense Insight Agent
    25/01/2016    10:53:26    ================================================================================
    25/01/2016    10:53:26      Product Code (HKLM)      : {849C9F36-4414-48AC-82E5-1F1AB48CDF32}
    25/01/2016    10:53:26      Package Code (HKCR)      : 408811B84A550554485F07E621CCF1FA
    25/01/2016    10:53:26      Version      (HKLM)      :
    25/01/2016    10:53:26      Most Current Install Date: 20151130
    25/01/2016    10:53:26      Target Install Location  :
    25/01/2016    10:53:26      Registry Path            : HKEY_CLASSES_ROOT\Installer\Products\63F9C9484144CA84285EF1A14BC8FD23\SourceList
    25/01/2016    10:53:26      Package      (HKCR)      : fcca0e6.msi
    25/01/2016    10:53:26      Install Source           :
    25/01/2016    10:53:26      LastUsedSource           : n;1;C:\Build\AppSense\Insight Agent\\
    25/01/2016    10:53:26      UnInstall String         : MsiExec.exe /I{849C9F36-4414-48AC-82E5-1F1AB48CDF32}
    25/01/2016    10:53:26    
    25/01/2016    10:53:26        fcca0e6.msi exists on the LastUsedSource path, no actions needed.
    25/01/2016    10:53:26    
    25/01/2016    10:53:26    Installer Cache File: C:\Windows\Installer\113a97.msi
    25/01/2016    10:53:26    
    25/01/2016    10:53:26        Package exists in the Installer cache, no actions needed.
    25/01/2016    10:53:26        Should you get errors about C:\Windows\Installer\113a97.msi or C:\Build\AppSense\Insight Agent\\fcca0e6.msi then you
    25/01/2016    10:53:26        may need to manually copy the file, if file exists replace the problem file,
    25/01/2016    10:53:26        Copy and paste the following command line into an administrative command prompt:
    25/01/2016    10:53:26    
    25/01/2016    10:53:26         Copy "C:\Build\AppSense\Insight Agent\\fcca0e6.msi" C:\Windows\Installer\113a97.msi
    25/01/2016    10:53:26    
    25/01/2016    10:53:26    
    25/01/2016    10:53:26    AppSense Insight Agent Patches Installed
    25/01/2016    10:53:26    --------------------------------------------------------------------------------
    25/01/2016    10:53:26     Display Name            :    AppSense Insight Agent 1.4 SP1
    25/01/2016    10:53:26     KB Article URL          :
    25/01/2016    10:53:26     Install Date            :    20151130
    25/01/2016    10:53:26       Uninstallable :   1
    25/01/2016    10:53:26     Patch Details:
    25/01/2016    10:53:26       - HKEY_CLASSES_ROOT\Installer\Patches\3D52119369DBA4A408CFF9EAC1460087
    25/01/2016    10:53:26       - PackageName:   InsightAgent64_1.4.24.0.msp
    25/01/2016    10:53:26       - Patch LastUsedSource: n;1;C:\Build\AppSense\Insight Agent\
    25/01/2016    10:53:26       - Installer Cache File Path:     C:\Windows\Installer\13921dbf.msp
    25/01/2016    10:53:26       - Per SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Patches\3D52119369DBA4A408CFF9EAC1460087\LocalPackage
    25/01/2016    10:53:26    
    25/01/2016    10:53:26        Package exists in the Installer cache, no actions needed.
    25/01/2016    10:53:26        Package will update automatically if needed assuming that
    25/01/2016    10:53:26        the LastUsedSource exists.
    25/01/2016    10:53:26    
    25/01/2016    10:53:26        Should you get errors about C:\Windows\Installer\13921dbf.msp or C:\Build\AppSense\Insight Agent\InsightAgent64_1.4.24.0.msp then you
    25/01/2016    10:53:26        may need to manually copy missing files, if file exists replace the problem file,
    25/01/2016    10:53:26        Copy and paste the following command line into an administrative command prompt.
    25/01/2016    10:53:26    
    25/01/2016    10:53:26         Copy "C:\Build\AppSense\Insight Agent\InsightAgent64_1.4.24.0.msp" C:\Windows\Installer\13921dbf.msp