Nasty exceptions in Timer scope

Unhandled exceptions occurring in Timer scope in a .Net Core application will crash the application

Björn Weström

2 minute read

Unhandled exceptions occurring in Timer scope in a .Net Core application will crash the application without any logs or any graceful shutdown. Make sure to catch any exceptions in Timer scope and handle them without rethrowing.

Keeping System.Text.Json lean

The System.Text.Json serializer has an unexpected performance penalty when used with options

Björn Weström

10 minute read

Serialization with System.Text.Json has an unexpected performance penalty when used with options, such as setting the PropertyNamingPolicy to CamelCase. For small objects, serialization is ~200x slower! To avoid this issue, store the options object in a class member and pass that member to JsonSerializer.Serialize.

The woes of Password-less authentication

Password-less authentication is actively pushed as the future of authentication. Where's the catch?

Björn Weström

8 minute read

I have followed the development of secure tokens with great interest. In the early days tokens such as RSA SecurID couldn’t do much more than give you six digits once per minute. But since those six digits were generated in a very secure manner thanks to cryptographic algorithms, they were an effective additional authentication token. This authentication token is referred to as a one time password (OTP), since the token only exists for a limited time and will not be accepted for logins…