Introduction to Authentication with ASP.NET Core
This is the first in a series of posts looking at authentication and authorisation in ASP.NET Core. In this post, I'm going to talk about authentication in general and how claims-based authentication...
View ArticleExploring the cookie authentication middleware in ASP.NET Core
This is the second in a series of posts looking at authentication and authorisation in ASP.NET Core. In the previous post, I talked about authentication in general and how claims-based authentication...
View ArticleAccess services inside ConfigureServices using IConfigureOptions in ASP.NET Core
In a recent post I showed how you could populate an IOptions<T> object from the database for the purposes of caching the query result. It wasn't the most flexible solution or really recommended...
View ArticleHow to set the hosting environment in ASP.NET Core
When running ASP.NET Core apps, the WebHostBuilder will automatically attempt to determine which environment it is running in. By convention, this will be one of Development, Staging or Production but...
View ArticleA look behind the JWT bearer authentication middleware in ASP.NET Core
This is the next in a series of posts about Authentication and Authorisation in ASP.NET Core. In the first post we had a general introduction to authentication in ASP.NET Core, and then in the...
View ArticleAn introduction to Session storage in ASP.NET Core
A common requirement of web applications is the need to store temporary state data. In this article I discuss the use of Session storage for storing data related to a particular user or browser...
View ArticleAn introduction to OAuth 2.0 using Facebook in ASP.NET Core
This is the next post in a series on authentication and authorisation in ASP.NET Core. In this post I look in moderate depth at the OAuth 2.0 protocol as it pertains to ASP.NET Core applications,...
View ArticlePOST-REDIRECT-GET using TempData in ASP.NET Core
In this post I will show how you can use Session state and TempData to implement the POST-REDIRECT-GET (PRG) design pattern in your ASP.NET Core application. Disclaimer - The technique shown here,...
View ArticleAn introduction to OpenID Connect in ASP.NET Core
This post is the next in a series of posts on authentication in ASP.NET Core. In the previous post we showed how you can use the OAuth 2.0 protocol to provide 'Login via Facebook' functionality to...
View ArticleConfiguring environment specific services for dependency injection in ASP.NET...
In this short post I show how you can configure dependency injection so that different services will be injected depending if you are in a development or production environment. tl;dr - save the...
View ArticleConfiguring environment specific services in ASP.NET Core - Part 2
In my previous post, I showed how you could configure different services for dependency injection depending on the current hosting environment, i.e. whether you are currently running in Development or...
View ArticleHTML minification using WebMarkupMin in ASP.NET Core
It is common practice in web development to minify your static assets (CSS, JavaScript, images) as part of your deployment process. This reduces the amount of data being sent over the network, without...
View ArticleViewing what's changed in ASP.NET Core 1.0.1
On 13th September, Microsoft announced they are releasing an update to .NET Core they are calling .NET Core 1.0.1. Along with the framework update, they are also releasing 1.0.1 version of ASP.NET and...
View ArticleAdding Localisation to an ASP.NET Core application
In this post I'll walk through the process of adding localisation to an ASP.NET Core application using the recommended approach with resx resource files. Introduction to Localisation Localisation in...
View ArticleHow to use machine-specific configuration with ASP.NET Core
In this quick post I'll show how to easily setup machine-specific configuration in your ASP.NET Core applications. This allows you to use different settings depending on the name of the machine you...
View ArticleLocalising the DisplayAttribute and avoiding magic strings in ASP.NET Core
This post follows on from my previous post about localising an ASP.NET Core application. At the end of that article, we had localised our application so that the user could choose their culture, which...
View ArticleInjecting services into ValidationAttributes in ASP.NET Core
I was battling the other day writing a custom DataAnnotations ValidationAttribute, where I needed access to a service class to perform the validation. The documentation on creating custom attributes...
View ArticleIntroduction to Authorisation in ASP.NET Core
This is the next in series of posts about authentication and authorisation in ASP.NET Core. In the first post we introduced authentication in ASP.NET Core at a high level, introducing the concept of...
View ArticleCustom authorisation policies and requirements in ASP.NET Core
This post is the next in a series of posts on the authentication and authorisation infrastructure in ASP.NET Core . In the previous post we showed the basic framework for authorisation in ASP.NET Core...
View ArticleModifying the UI based on user authorisation in ASP.NET Core
This post is the next in the series on authentication and authorisation in ASP.NET Core. It shows how to modify the UI you present based on the authorisation level of the current user. This allows you...
View Article