Programming

Check Certificate Expiry Date in .NET Core

Posted on

I needed to check the certificate expiry date in an NUnit test. The below snippet can be used to check any certificate properties, using a custom certificate validation callback. All you need to do is read the properties you are interested in within the callback so you can check them afterwards. DateTime notAfter = DateTime.UtcNow; […]

Programming

.NET Core Entity Framework Migrations

Posted on

When you don’t want to script out your own database, Entity Framework Core has your back. When you change your database context or the models it uses, you can use a couple of commands to create and update your database to keep it in sync with your model. These examples run in the Package Manager […]

Programming

Using .NET Core Identity Without the Standard Pages

Posted on

This is a quick article about using .NET Core Identity without the standard pages. It was almost titled “why does .NET Core Identity ignore my LoginPath that I set in options?”. Let’s start with a common chunk of code that you’ll find in your Startup.cs file if you’ve added identity to your project… services.AddIdentity<ApplicationUser, ApplicationRole>() […]