Windows

The Raygun Agent can be run as a Docker container, see Docker instructions for more information.


Follow these steps to install the Raygun Agent on Windows Server 2008 or above using the MSI installer.

The Raygun APM Agent can be scripted to install silently, see the scripted installation instructions.

Download the MSI installer to your server. Run the installer follow the on-screen prompts to complete installation.

Windows 64-bit - Installer for the 32-bit and 64-bit profiler and agent.
Windows 32-bit - Installer for the 32-bit profiler only and agent.

When installing with the MSI installer the Raygun Agent is configured as a Windows Service set to auto-start. When the installer completes, the agent will be running.

To configure the agent and your application please check the setup instructions for your application.


Follow these steps to install the Raygun Agent on a Windows Server using .NET Core.

The Raygun Agent has not been built self-contained as we assume you already have the .NET Core runtime installed. If required, download and install the .NET Core 3.0 runtime.

Create a directory to install the Raygun Agent to (change this to what works best for you). Then download the Raygun Agent zip file to that directory.

$installto = "${env:ProgramFiles}\Raygun\RaygunAgent\"

New-Item -Path $installto -ItemType "directory"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri "https://downloads.raygun.com/APM/latest/RaygunAgent-netcore.zip" -OutFile "${installto}\RaygunAgent-netcore.zip"
Add-Type -assembly "system.io.compression.filesystem"
[io.compression.zipfile]::ExtractToDirectory("${installto}\RaygunAgent-netcore.zip", $installto)
Remove-Item "${installto}\RaygunAgent-netcore.zip"

You can run the agent in the console or register it as a Windows Service. Make sure you enter your API key below. You API key can be found on the setup instructions page when creating a new application in Raygun.

$env:Raygun_DefaultApiKey = '[YOUR-API-KEY]'
dotnet "${env:ProgramFiles}\Raygun\RaygunAgent\RaygunAgent.dll"

To install as a Windows Service:

$agentpath = "${env:ProgramFiles}\Raygun\RaygunAgent"
$params = @{
  Name = "RaygunAgentNetCore"
  BinaryPathName = "${agentpath}\RaygunAgent.exe"
  DisplayName = "Raygun Agent"
  StartupType = "Automatic"
  Description = "Agent for Raygun APM"
}
New-Service @params
Start-Service $params.Name
Start-Process -FilePath "${agentpath}\rgc.exe" -ArgumentList "-register [YOUR-API-KEY]" -WindowStyle hidden

When restarting the application there is an overhead that could cause the CPU to spike, but this high usage shouldn't persist. APM products will always have an overhead, but our goal is to ensure it's the lowest overhead possible. The high CPU usage you're experiencing is likely caused by a high method call count. We recommend setting up code filtering for a selection of high count method calls and seeing if this improves the CPU usage.

If this issue persists, please reach out to our engineering support team via the contact page, or click contact us in the app.


What if everything is set up, but there are no traces in the Raygun UI? Try following the steps below to resolve common issues with receiving traces.

Run some basic status checks by loading the Raygun Profiler Configuration tool and switching to the "Help" tab (it can be found at %ProgramFiles(x86)%\Raygun\RaygunAgent\RaygunConfigurationUtil.exe or by searching "Raygun" in the start menu).

The basic status checks will automatically run and will display a traffic light for each check. Ensure that all status checks are showing green.

Alternatively you can run these same status checks using the CLI tool.

Running rgc.exe -status will produce a result that should look similar to this:

Running Raygun Agent status checks...
Agent status: Registered
Agent test: Connected to the Raygun Agent v1.0.\*.0 on port 2790.
API test: Connected to the Raygun API at https://api2.raygun.com.
API key test: API key *** is valid
Profiler x86 test: 32-bit Profiler found at D:\home\Raygun\Profiler\1.0.\*\x86\RaygunProfiler.dll.
Profiler x64 test: 64-bit Profiler found at D:\home\Raygun\Profiler\1.0.\*\x64\RaygunProfiler.dll.


If any traffic lights are red, you will receive a message describing the problem. Here are some things you can try in order to resolve these problems:

  • Check that the Raygun Agent is running. It should be running as a service on your machine called "Raygun Agent". If the application you are profiling is on a separate machine from the agent, check that traffic is allowed on port 2790.
  • Check that the machine running the Raygun Agent can access the Raygun API at https://api2.raygun.com/healthcheck, either using your browser or the cURL command. If you're using a browser, look for a 200 response in the network tab of the browser's developer tools.
  • Check that your firewall is not blocking Raygun.
  • Check that the API key is correct. If you have not sent any traces yet, your API key is displayed at the top of the instructions page for your new application. Otherwise, you can find the key under "Application settings" in the menu on the Raygun dashboard. Ensure that this is the same key that you used when you registered your process in the Raygun Profiler Configuration tool. You can verify this by selecting your process and clicking "Edit":

Profiler configuration


All status checks are now green, nice! Traces should come to us shortly.

If you are still not receiving traces, you will need to run the profiler test and send us diagnostic session as described below:


The Raygun Profiler Configuration tool has a function to run a test that will validate that a local test application can be executed and profiled. When this test is run the CLI tool is run in test mode and profiled. If the test is successful then a single trace will be sent to your Raygun application with a name of "Mindscape.Raygun.Agent.Cli.Program.Main". To run this test, open the Raygun Profiler Configuration tool, click on the "Help" tab and click on the "Run a profiler test" button.
If profiler test fails, please contact us with the resulting error message for further assistance.

Profiler test succeeded? Great! After a few minutes you should receive a test trace in you Raygun account.

To provide us with more information about the issue, please enable detailed logging and send us a diagnostic session as described below:


  • The log files for the Raygun Agent are located under %ProgramData%\Raygun\AgentLogs\ on Windows.

  • To enable detailed logging for the Raygun Agent, simply add a configuration setting to %ProgramFiles(x86)%\Raygun\RaygunAgent\RaygunAgent.exe.config

  • Add a new element to the <appSettings> section like <add key="LogLevel" value="Verbose"/> (other options are Warning, Info, Verbose, Debug).

  • Save the configuration file changes and restart the "Raygun Agent" Windows service, e.g. sc stop RaygunAgent followed by sc start RaygunAgent.


  • Deregister your application.
  • Locate rgc.exe in the Raygun installation directory.
  • Run
rgc.exe -enable <raygun.com.apppool> -type IIS -apikey <APP-API-KEY> -startup 0 -debugmode
  • The application will be profiled in debug mode. This step is required so the most possible detail will be sent in the diagnostics session.

Before running a diagnostic session you should enable debug mode for your application using the CLI. We also recommend that you deregister all applications other than the one you're wanting to capture the diagnostic information for.

Running a diagnostics session will capture the following information and will help Raygun support to troubleshoot issues you're having:

  • Snapshot of log files
  • Snapshot of agent settings
  • Agent log files with Log level of Debug automatically set
  • Trace package and source files generated during the session
  • A trace of data being sent from the profiler to the agent
  • Profiler log messages (only captured if debug mode is enabled)

  • Start Raygun Configuration Tool and open Help tab.
  • Click Start diagnostic session button

APM profiler configuration: start diagnostic session.

  • Make a few requests to the application having issues
  • Click Complete diagnostic session button
  • The session should now appear in the list to the left. Click Upload button. The session will be sent to us.

Send diagnostics


Start a diagnostics session that is uploaded to Raygun when complete

rgc.exe -auto-diagnostic 300

For more information on diagnostic command options, see the CLI documentation.


Please send the information below to us using the contact us page.

  • The diagnostic session identifier
  • Hosting type - cloud, on premise, Azure App Service etc
  • OS Version, 32 or 64 bit
  • Web Server (i.e. IIS or Node) version
  • Framework type (i.e. Dotnet Core or Rails)
  • Framework version
  • For .NET Core under IIS - in process or out of process hosting type