ASP.NET Data Protection on Kubernetes: Why It Matters and How to Get It Right

If you have ever migrated an ASP.NET application from Azure App Service or IIS to Kubernetes, there is a good chance that ASP.NET Data Protection was not something you had to think about — until things started breaking in subtle and confusing ways. Users getting logged out seemingly at random, cookie validation failures appearing under load, or errors that only materialise after a deployment. These are the classic symptoms of a Data Protection configuration that has not been adapted for a distributed, containerised environment. [Read More]

Seamless NuGet Authentication to Azure DevOps Artifacts from Dockerfile

When performing .NET Multi-stage builds within a Dockerfile, it may be required to restore some artifacts from an Azure DevOps Artifact Feed. I have previosuly seen this process being achieved by using the Replace Tokens Azure DevOps Task to insert a PAT token into the Dockerfile during the build pipeline. This approach requires that you to update your nuget.config files to include a <packageSourceCredentials></packageSourceCredentials> section with a Username and ClearTextPassword key, then use token replacement for the value. [Read More]

Create Dynamic Azure DevOps Variable Insertion when using Templates

There are scenarios where it might be useful to call a template and have that template define variables dynamically based on the provided parameters. The main use case I have seen for this is when the Replace Tokens Azure DevOps Task is called. Token replacement can be extremely useful if you have lots of dynamic values that need to be inserted into your configuration based on inputs from the pipeline. For example, when using the same repo for DEV, UAT and PROD. [Read More]