Configure ELMAH on your site

PREREQUISITES: Your Microsoft SQL Server must be version 2000 or above.

  1. Install the ELMAH on SQL Server package from the NuGet repository.

    NOTE: ELMAH on SQL Server package is version 1.2. It has a dependency to the ELMAH package, which must be version 1.2.2. You can also install the ELMAH NuGet package, version 1.2.2, from the NuGet repository.

  2. Make sure the elmah section group is added inside the <configSections> tag in the web.config file. If not, add the section group manually:

    NOTE: Мake sure the Elmah.dll fileis loaded in the bin folder of your Sitefinity CMS web application.

  3. Complete the installation of the ELMAH.SqlServer:
    1. Create a new database to host ELMAH.
    2. Run the Elmah.SqlServer.sql script against an empty ELMAH database.

      NOTE: You can find the script in the ELMAH GitHub repository Downloads section. Download the Sources ZIP file.

  4. Open the web.config file of your application and perform the following transformations:
  5. (Optional) To send email notifications for each error at the time it occurs, you must configure your SMTP settings.

    If you do not have an SMTP server, you can download the open source smtp4dev and configure it to listen on port 26
    To do this, in your web.config file, after the <configSections> tag, add the following:

  6. (Optional) Register ELMAH handler by adding the following code line in the <handlers> and the <httpHandlers> sections in the web.config file:

    For more information about the ELMAH error logging handler, see Test error logging with ELMAH.

  7. To turn on ELMAH, navigate to Administration » Settings » Advanced » System » UI Elmah Config.
  8. Select the IsElmahLoggingTurnedOn checkbox and click Save changes.
    Every time you change the selection of this checkbox, you must restart the application.

    NOTE: When the ELMAH logging is turned off, the standard logging is working and you can see all the logging information in App_Data/Sitefinity/LogsWhen you select the IsElmahLoggingTurnedOn checkbox, all logging information is transferred to ELMAH.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?