Stefan Holm Olsen

Blog posts

This page lists all my blog posts chronologically (newest first).

Tagging SendGrid mails in Episerver DXC

Episerver DXC subscriptions comes bundled with a nice SendGrid subscription for sending transactional emails. Did you know that you can add tags to each email for easy tracking? Read about it here.

Read more

A nice handling of APIs when Episerver is in readonly mode

When an Episerver Commerce site is put into read-only mode, either manually or by automation, it would be really bad if the code is not prepared to for that situation. In this post, I provide some simple action filters to perform such a graceful degradation.

Read more

Easy fetching of failed requests from Application Insights

Logging of both good and failed requests is a very good practice. But logs are no good if we cannot easily filter and figure what to act on, like fixing URLs that frequently returns 404 or 500 errors. I will show how to easily query those requests from Application Insights.

Read more

Make better and richer logs with Application Insights

Logging is a very good practice in every application. Both good and bad events or outcomes should be logged to be on top of what happens. But how to log structured and searchable metadata that can be aggregated and monitored? I got a solution here.

Read more

8 things to avoid to make an Episerver site go faster

Caring much about the performance of my code, this blog post is a continuation of my serial about performance optimization of Episerver solutions. This time I reveal eight common issues affecting performance, along with suggested solutions to each. Some of those issues are actually very common across projects and developers.

Read more

Caching custom data that depends on Episerver content

Caching is great! Caching can make a slow site fast, and a fast site blazingly fast. But how to cache custom objects that rely on Episerver content, in a way that is simple, safe and performant way?

Read more

Cache busting 2.0: an update for ASP.Net Core

Enabling long term caching of static frontend files is good for the performance of both servers and browsers. However, to instantly force a re-download of files following a new release, cache busting solution is needed. This is an update to my original cache busting solution and blog post. It is more lean and efficient and supports ASP.Net Core, too.

Read more

Rendering correct Arabic glyphs in PDF (using PDFSharp)

I were recently tasked with creating code to render PDF files containing Arabic words using PdfSharp. Unfortunately, PdfSharp does not support Arabic or other right-to-left languages. Here is the workaround I made up.

Read more