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:
-
Open your Sitefinity CMS application in Visual Studio.
-
From the context menu of the solution, select Add» Existing project…
-
Browse to the folder of the custom error trace listener.
-
Select the
ExternalLogging.csprojfile. -
From the context menu of your project's Reference folder, select Add » References…
-
Select the newly added ExternalLoggingproject.
-
Open the
web.configfile of your Sitefinity CMS application and configure Raygun by adding a config section and aRaygunSettingsconfiguration block in the following way:XML<configuration> <configSections> ... <section name="RaygunSettings" type="Mindscape.Raygun4Net.RaygunSettings, Mindscape.Raygun4Net"/> ... </configSections> ... <RaygunSettings apikey="YOUR_APP_API_KEY" /> </configuration>NOTE: You can check the Raygun GitHub readme file for additional information about how to configure your application's
web.configfile. -
Save and close the
web.configfile. -
Build your solution.
As a result, your Sitefinity CMS application errors are logged to the Raygun.io dashboard.