Errors and Logs: Configure Elmah

You can get started logging your Errors using an Elmah appender with minimal changes to your project. You essentially just add a few DLLs to your project and then add some configuration details to your .config file specifying an additional (or replacement) appender.

Getting Started Using NuGet

If you’re using NuGet from Visual Studio, you can find and integrate the Stackify Elmah or Elmah MVC Appender libraries and configurations quickly and easily. Just search for Stackify and then install the Stackify Elmah Appender or Stackify Elmah MVC Appender (depending on your application type).

Getting Started Using NuGet

Or you can install directly from the Package Manager Console using:

Install-Package StackifyLib.Elmah
Install-Package StackifyLib.Elmah.MVC


Configuring with NuGet

In order for the NuGet installation to complete, copy your Stackify Activation Key (license key) from your Retrace Account Info page and paste it here. Once this is complete, you are done with the installation and configuration of the Stackify Elmah Appender.

Configuring with NuGet

Error Results on Non-Monitored Servers

If you are logging errors from a server that doesn’t have a Stackify monitoring agent on it, you have to add an Environment key to the appSettings section of your configuration, as it cannot be inferred by Stackify without an agent running on the machine.

It should also be noted that if you are logging errors for your application and that application doesn’t appear as an app in the App Stacks page, the only way to see error telemetry is from the global Error Dashboard page, as there will be no App Dashboard for that application if it’s not installed on a server that is being monitored.

Below is an example of the setting needed if you are logging errors from an unmonitored server:

    <add key="Stackify.ApiKey" value="Your Activation Key" />
    <add key="Stackify.AppName" value="Your App Name"/>
    <add key="Stackify.Environment" value="Your Environment"/> <!-- optional - inferred by Stackify if running on a monitored server -->


If you are still having trouble getting started, follow our Troubleshoot: Errors and Logs .NET Configurations guide to address common issues.