Elmah.AspNetCore 1.0.1

dotnet add package Elmah.AspNetCore --version 1.0.1
NuGet\Install-Package Elmah.AspNetCore -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Elmah.AspNetCore" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Elmah.AspNetCore --version 1.0.1
#r "nuget: Elmah.AspNetCore, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Elmah.AspNetCore as a Cake Addin
#addin nuget:?package=Elmah.AspNetCore&version=1.0.1

// Install Elmah.AspNetCore as a Cake Tool
#tool nuget:?package=Elmah.AspNetCore&version=1.0.1

Elmah.AspNetCore

ELMAH (Error Logging Middleware and Handlers) for ASP.NET Core.

Features include:

  • Logging of unhandled exceptions
  • Friendly UI to view captured errors along with contextual information
  • Hooks to include handled exceptions and additional contextual information
  • Various methods to persist error logs
  • Supports securing UI via built-in ASP.Net Core functionality
  • Notifications of errors through email or custom notifiers
  • Integration with Microsoft.Extensions.Logging to capture logs made during a request
  • Supports .NET 6+

Basic usage

First, install the Elmah.AspNetCore Nuget package into your app.

dotnet add package Elmah.AspNetCore

Next, in your application's Program.cs file, configure Elmah:

using Elmah.AspNetCore;

var builder = WebApplication.CreateBuilder(args);

builder.Host.UseElmah(); // <- Add this to configure Elmah

var app = builder.Build();

app.UseErrorHandler();
app.UseElmahMiddleware(); // <- Add this to register middleware

app.MapElmah(); // <- Add this to register Elmah endpoints

builder.Host.UseElmah() registers and configures the Elmah services. An overload which accepts an action is available to modify the configuration.

app.UseElmahMiddleware() registers the middleware used by Elmah to start capturing errors and contextual information. Only middleware registered after the Elmah middleware will be included in the error capturing. It is recommended that this is included before most other middleware. For best results, call after the built-in UseExceptionHandler().

app.MapElmah() registers the routes used to serve content for the Elmah UI. By default these will be under /elmah, but the method includes an overload which allows overriding the root path.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 284 2/4/2024
1.0.0 142 1/27/2024
1.0.0-preview.3 71 1/25/2024
1.0.0-preview.2 53 1/23/2024
1.0.0-preview.1 53 1/19/2024
1.0.0-preview.0 141 1/3/2024