Implementing custom policies in ASP.NET Core using the HttpContext
This article shows how to implement a custom ASP.NET Core policy using the AuthorizationHandler class. The handler validates, that the identity from the HttpContext has the authorization to update the...
View ArticleShared Localization in ASP.NET Core MVC
This article shows how ASP.NET Core MVC razor views and view models can use localized strings from a shared resource. This saves you creating many different files and duplicating translations for the...
View ArticleIdentityServer4 Localization with the OIDC Implicit Flow
This post shows how to implement localization in IdentityServer4 when using the Implicit Flow with an Angular client. Code: https://github.com/damienbod/AspNet5IdentityServerAngularImplicitFlow The...
View ArticleIdentityServer4 Localization using ui_locales and the query string
This post is part 2 from the previous post IdentityServer4 Localization with the OIDC Implicit Flow where the localization was implemented using a shared cookie between the applications. This has its...
View ArticleSending Direct Messages using SignalR with ASP.NET core and Angular
This article should how SignalR could be used to send direct messages between different clients using ASP.NET Core to host the SignalR Hub and Angular to implement the clients. Code:...
View ArticleUsing an EF Core database for the IdentityServer4 configuration data
This article shows how to implement a database store for the IdentityServer4 configurations for the Client, ApiResource and IdentityResource settings using Entity Framework Core and SQLite. This could...
View ArticleCreating specific themes for OIDC clients using razor views with IdentityServer4
This post shows how to use specific themes in an ASPNET Core STS application using IdentityServer4. For each OpenId Connect (OIDC) client, a separate theme is used. The theme is implemented using...
View ArticleUsing the dotnet Angular template with Azure AD OIDC Implicit Flow
This article shows how to use Azure AD with an Angular application implemented using the Microsoft dotnet template and the angular-auth-oidc-client npm package to implement the OpenID Implicit Flow....
View ArticleSecuring an ASP.NET Core MVC application which uses a secure API
The article shows how an ASP.NET Core MVC application can implement security when using an API to retrieve data. The OpenID Connect Hybrid flow is used to secure the ASP.NET Core MVC application. The...
View ArticleAdding HTTP Headers to improve Security in an ASP.NET MVC Core application
This article shows how to add headers in a HTTPS response for an ASP.NET Core MVC application. The HTTP headers help protect against some of the attacks which can be executed against a website....
View ArticleSecuring the CDN links in the ASP.NET Core 2.1 templates
This article uses the the ASP.NET Core 2.1 MVC template and shows how to secure the CDN links using the integrity parameter. A new ASP.NET Core MVC application was created using the 2.1 template in...
View ArticleFirst experiments with makecode and micro:bit
At the MVP Global Summit, I heard about MakeCode for the first time. The project makes it really easy for people to get a first contact, introduction with code and computer science. I got the chance to...
View ArticleUsing Message Pack with ASP.NET Core SignalR
This post shows how SignalR could be used to send messages between different C# console clients using Message Pack as the protocol. An ASP.NET Core web application is used to host the SignalR Hub....
View ArticleComparing the HTTPS Security Headers of Swiss banks
This post compares the security HTTP Headers used by different banks in Switzerland. securityheaders.io is used to test each of the websites. The website of each bank as well as the e-banking login was...
View ArticleSupporting both Local and Windows Authentication in ASP.NET Core MVC using...
This article shows how to setup an ASP.NET Core MVC application to support both users who can login in with a local login account, solution specific, or use a windows authentication login. The identity...
View ArticleASP.NET Core Authorization for Windows, Local accounts
This article shows how authorization could be implemented for an ASP.NET Core MVC application. The authorization logic is extracted into a separate project, which is required by some certification...
View ArticleOAuth Authentication with PKCE for a .NET Core Console Native Application
This article shows how to use a .NET Core console application securely with an API using the RFC 7636 specification. The app logs into IdentityServer4 using the OIDC authorization code flow with a PKCE...
View ArticleUploading and sending image messages with ASP.NET Core SignalR
This article shows how images could be uploaded using a file upload with a HTML form in an ASP.MVC Core view, and then sent to application clients using SignalR. The images are uploaded as an...
View ArticleDynamic CSS in an ASP.NET Core MVC View Component
This post shows how a view with dynamic css styles could be implemented using an MVC view component in ASP.NET Core. The values are changed using a HTML form with ASP.NET Core tag helpers, and passed...
View ArticleASP.NET Core MVC Form Requests and the Browser Back button
This article shows how an ASP.NET Core MVC application can request data using a HTML form so that the browser back button will work. When using a HTTP POST to request data from a server, the back...
View Article