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 •
322 posts •
How to generate header images for blogs and ASP.NET Core

Automates blog header-image generation with Bannerbear: designs a Template with a dynamic message text layer, generates images via a POST to the Bannerbear API or its Simple URLs feature, then wires the result into the twitter:image meta tag alongside twitter:card summary_large_image. ...

Built-in rate limiting in ASP.NET Core vs AspNetCoreRateLimit

Compares ASP.NET Core 7's built-in Microsoft.AspNetCore.RateLimiting middleware against the AspNetCoreRateLimit package by implementing an api_key-based policy using GetFixedWindowLimiter capped at 10 requests per hour, and overriding RejectionStatusCode to 429 instead of the default 503. ...

How to download files from ASP.NET Core MVC

Covers the Content-Disposition response header behind file downloads, then compares ASP.NET Core's four IActionResult types - FileContentResult, FileStreamResult, PhysicalFileResult, VirtualFileResult - with a working File() example in an MVC HomeController. ...

How to get base URL in ASP.NET Core

Builds a BaseUrl() HttpRequest extension method using UriBuilder to strip default ports cleanly, then shows how to reach the same request data from Razor Pages by registering IHttpContextAccessor in Program.cs. ...

Three NuGet packages to improve exceptions in .NET/C#

Introduces Xeption for enriching custom exceptions via UpsertDataList and ThrowIfContainsErrors, Ben.Demystifier's Demystify method for readable stack traces, and Polly's Policy.Handle/Retry for resilient HTTP calls. ...

elmah.io launches two GitHub Actions in the GitHub Marketplace

Announces elmah.io's GitHub Technology Partner status and two new GitHub Actions: elmahio/github-create-deployment-action for deployment tracking and elmahio/github-upload-source-map-action for de-minifying JavaScript stack traces on release. ...

Building a quick Reddit Blazor client without Reddit's API

Builds a Blazor WebAssembly Reddit client that skips Reddit's OAuth-gated API entirely, instead querying the Elasticsearch-backed pushshift.io search API from a RedditClient.razor page with a live search field and results table. ...

Deploying a MkDocs documentation site with GitHub Actions

Walks through a GitHub Actions workflow (main.yml) that runs on ubuntu-latest, checks out code with actions/checkout@v2, installs Python via actions/setup-python@v2, installs MkDocs with pip, and deploys via mkdocs gh-deploy --force --clean --verbose on every push to the main branch. ...

Hosting a MkDocs-driven documentation site on GitHub Pages

Explains how to publish a MkDocs site to GitHub Pages by pushing a local git repo to GitHub and running mkdocs gh-deploy, which builds the static site straight into a gh-pages branch GitHub Pages auto-deploys, plus why the generated site folder belongs in .gitignore, not version control. ...