Thomas Ardal

Thomas Ardal

Meet Thomas, the founder and developer behind elmah.io. Thomas blogs about everything technical from C# and ASP.NET Core to machine learning.

Denmark •
321 posts •
Test run of HTTP Logging in ASP.NET Core 6

Walks through enabling ASP.NET Core 6's app.UseHttpLogging() middleware, scoping the log level to Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware in appsettings.json to cut noise, routing entries to elmah.io via Elmah.Io.Extensions.Logging, and trimming output with HttpLoggingFields options. ...

Server-side source map support on elmah.io

Explains elmah.io's server-side JavaScript source map support: upload minified bundle source maps privately via the API, Swagger UI, or Azure DevOps, GitHub Actions, or Octopus Deploy integrations, so elmah.io de-minifies stack traces automatically without publishing the map to your webserver. ...

3 new free tools for .NET developers

Introduces 3 new free elmah.io tools, bringing the total to 9: an Appsettings.json Transform Tester for previewing how appsettings.json merges with appsettings.production.json, a Base64 Image Encoder generating embed code for HTML, CSS, XML, and JSON, and an MD5 Encoder outputting ready-to-paste C# ...

Updating NuGet packages from command-line - deep dive

Compares four ways to update NuGet packages across multiple projects and solutions: Visual Studio's Package Manager UI, hand-editing the PackageReference in .csproj, running dotnet add package Spectre.Console --version 0.41.0 from the command line, and third-party bulk-update tools like NuKeeper. ...

Async processing of long-running tasks in ASP.NET Core

Builds a fire-and-forget queue in ASP.NET Core: a BackgroundWorkerQueue wrapping ConcurrentQueue and SemaphoreSlim, plus a LongRunningService extending BackgroundService to dequeue and run items, turning a simulated 10-second blocking call into an instant page load, noting Hangfire and Quartz.NET. ...

Debugging System.FormatException when launching ASP.NET Core

Diagnoses System.FormatException at ASP.NET Core startup, usually a wrapped JsonReaderException from malformed JSON: a checklist to validate appsettings.json, appsettings.*.json, secrets.json, global.json, launchSettings.json, ensuring an empty config file has {}, plus the Appsettings.json Validator ...

Stream large content from ASP.NET Core to avoid OutOfMemoryException

Fixes a System.OutOfMemoryException in ASP.NET Core caused by building a 100,000,000-string List in memory before returning it, by refactoring the IEnumerable<string> endpoint to use C#'s yield return keyword, which streams each value to the client as a 200 response instead of buffering everything. ...

Embedding source code on errors logged to elmah.io

Sets up elmah.io's embedded source code feature using the Elmah.Io.Client.Extensions.SourceCode package, comparing WithSourceCodeFromFileSystem for local runs against WithSourceCodeFromPdb plus EmbedAllSources for deployed apps. ...

HTTP Error 500.30 - ASP.NET Core app failed to start help

Troubleshoots the ASP.NET Core "White Screen of Death" startup failure with concrete fixes: temporarily forcing UseDeveloperExceptionPage in production, then wiring ConfigureLogging with AddEventLog or an elmah.io sink to surface the real error. ...