Skip to main content

Agent upgrade service

The Agent Upgrade Service is a background Windows service that helps you keep the .NET Framework and .NET Core for IIS agents automatically updated to the most recent version on Windows. The Agent Upgrade Service is included with the .NET Framework Agent Installer and .NET Core Agent for IIS Installer; the agent installers install two products:

  • the corresponding agent, and

  • the Agent Upgrade Service.

By default, the Agent Upgrade Service checks for new agent versions released to NuGet when the service first starts up (when the Windows Server is restarted.) If a new agent version is found, the Upgrade Service will download the new agent version, verify the installer’s signature, and then finally execute the installer.

Note

When a new agent version installed, IIS will be restarted.

The Agent Upgrade Service is an optional component and is not required for agent Assess and Protect features.

  • De-select the Install the agent upgrade service checkbox when installing the agent if you do not want to use the Agent Upgrade Service.

  • If installing the agent via command line, add INSTALL_UPGRADE_SERVICE=0 argument to not install the Agent Upgrade Service.

AgentUpgradeService.png

The behavior of the Agent Upgrade Service can be modified via an agent-specific configuration file in the Contrast data directory. The default location is C:\ProgramData\Contrast\upgrade-service.

The configuration for upgrading the .NET Core agent is located in the .NET Core YAML file.

enable: true #  Set to `true` for the agent to automatically upgrade to newer versions.
checks: Startup # Set the frequency with which the agent checks for updates. Valid values are `daily` for every 24 hours and on startup, or `startup` for *only* when service starts up.
timeout_ms: 60000 # Set the time allocated to execute the downloaded agent installer before cancelling.
nuget_repository_url: https://api.nuget.org/v3/index.json # Set the URL of the Nuget repository to be used for the .NET Core Agent for IIS Installer
nuget_package_name: Contrast.CoreIIS.Installer # Set the name of the .NET Core Agent for IIS Nuget package.
installer_upgrade_code: 82468c04-dfc0-4a4c-9eb9-c4b314c67fdc # Used internally to retrieve the current installed agent version from Windows.

Note

The Agent Upgrade Service is only included with the agent installer. It is not included with the manual .NET Core Agent, agent NuGet packages, or Azure App Service site extensions.