Enable the trace listener in your project

After you create the installer class, you need to reference the custom trace listener in your project, so that you can use it in your site.

NOTE: You need a Raygun API key to run this sample. To acquire a Raygun API key, register in Raugun.io and create a new application on your Raygun.io dashboard.

To enable the custom error trace listener:

  1. Open your Sitefinity CMS application in Visual Studio.
  2. From the context menu of the solution, select Add » Existing project…
  3. Browse to the folder of the custom error trace listener.
  4. Select the ExternalLogging.csproj file.
  5. From the context menu of your project's Reference folder, select Add » References…
  6. Select the newly added ExternalLogging project.
  7. Open the web.config file of your Sitefinity CMS application and configure Raygun by adding a config section and  a RaygunSettings configuration block in the following way:

    NOTE: You can check the Raygun GitHub readme file for additional information about how to configure your application's web.config file.

  8. Save and close the web.config file.
  9. Build your solution.

As a result, your Sitefinity CMS application errors are logged to the Raygun.io dashboard.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?