Blog posts

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

An OWIN middleware to support anonymous profiles and carts

Mar 01, 2020 by Stefan Holm Olsen

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.

Fix remote cache invalidation for Commerce sites on localhost

Jan 11, 2020 by Stefan Holm Olsen

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.

Tagging SendGrid mails in Episerver DXC

Nov 10, 2019 by Stefan Holm Olsen

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.

A nice handling of APIs when Episerver is in readonly mode

Sep 02, 2019 by Stefan Holm Olsen

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.

Easy fetching of failed requests from Application Insights

Jul 24, 2019 by Stefan Holm Olsen

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.

Make better and richer logs with Application Insights

Jun 16, 2019 by Stefan Holm Olsen

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.

8 things to avoid to make an Episerver site go faster

Jun 02, 2019 by Stefan Holm Olsen

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.

Caching custom data that depends on Episerver content

May 23, 2019 by Stefan Holm Olsen

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?

Cache busting 2.0: an update for ASP.Net Core

Apr 19, 2019 by Stefan Holm Olsen

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.