Stefan Holm Olsen

Blog posts

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

Burst-protecting pages with Cloudflare output caching

This is the story about how an Episerver site achieved extreme performance for some landing pages, by applying distributed output caching using Episerver DXC and Cloudflare.

Read more

Logging from OWIN to the default Episerver log

In my previous blog post I created two pieces of OWIN middleware. I also created a custom OWIN logger to forward all OWIN log entries to whichever log system Episerver is set to use. Read about the solution and check the code for yourself.

Read more

An OWIN middleware to support anonymous profiles and carts

Needing to support shopping carts for anonymous users, from both browsers and cookie-less native apps, I ended up with two new pieces of OWIN middleware. Very simple, efficient and supporting SameSite-aware cookies.

Read more

Fix remote cache invalidation for Commerce sites on localhost

Often when working on Episerver Commerce projects, I have found that remote events did not flow properly between the Commerce Manager and CMS sites, when developing on localhost. Most importantly this means that caching do not synchronize at all. In this blog post I share my simple approach to fixing event messaging on localhost, to make cache invalidation instant.

Read more

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