Tag Archives: aspnetcore
Implementing a silent token renew in Angular for the OpenID Connect Implicit flow
This article shows how to implement a silent token renew in Angular using IdentityServer4 as the security token service server. The SPA Angular client implements the OpenID Connect Implicit Flow ‘id_token token’. When the id_token expires, the client requests new tokens from the server, so that the user does not need to authorise again. Code: […]
ASP.NET Core IdentityServer4 Resource Owner Password Flow with custom UserRepository
This article shows how a custom user store or repository can be used in IdentityServer4. This can be used for an existing user management system which doesn’t use Identity or request user data from a custom source. The Resource Owner Flow using refresh tokens is used to access the protected data on the resource server. […]
Implementing OpenID Code Flow with PKCE using OpenIddict and Angular
This article shows how to implement the OpenID Connect Code Flow with PKCE using OpenIddict hosted in an ASP.NET Core application, an ASP.NET Core Web API and an Angular application as the client. Code: https://github.com/damienbod/AspNetCoreOpeniddict 2021-12-24 Updated to ASP.NET Core 6, Angular 13 2020-12-26 Updated to ASP.NET Core 5, Angular 11, OpenIddict 3 2017-05-27 Updated […]
ASP.NET Core Error Management with elmah.io
This article shows how to use elmah.io error management with an ASP.NET Core application. The error, log data is added to elmah.io using different elmah.io nuget packages, directly from ASP.NET Core and also using an NLog elmah.io target. Code: https://github.com/damienbod/AspNetCoreElmah elmah.io is an error management system which can help you monitor, find and fix application […]
Implementing an Audit Trail using ASP.NET Core and Elasticsearch
This article shows how an audit trail can be implemented in ASP.NET Core which saves the audit documents to Elasticsearch using the Elastic.Clients.Elasticsearch Nuget package. Code: https://github.com/damienbod/AspNetCoreElasticsearchAuditTrail History Should I just use a logger? Depends. If you just need to save requests, responses and application events, then a logger would be a better solution for […]
Creating an ASP.NET Core Docker application and deploying to Azure
This blog is a simple step through, which creates an ASP.NET Core Docker image using Visual Studio 2017, deploys it to Docker Hub and then deploys the image to Azure. Thanks to Malte Lantin for his fantastic posts on MSDN. See the links at the end of this post. Code: https://github.com/damienbod/AspNetCoreDockerAzureDemo 2017.02.03: Updated to VS2017 […]
Angular Lazy Loading with Webpack 3
This article shows how Angular lazy loading can be supported using Webpack 2 for both JIT and AOT builds. The Webpack loader angular-router-loader from Brandon Roberts is used to implement this. A big thanks to Roberto Simonetti for his help in this. Code: VS2017 angular 4.x Blogs in this series: ASP.NET Core, Angular with Webpack […]
Building production ready Angular apps with Visual Studio and ASP.NET Core
This article shows how Angular SPA apps can be built using Visual Studio and ASP.NET Core which can be used in production. Lots of articles, blogs templates exist for ASP.NET Core and Angular but very few support Angular production builds. Although Angular is not so old, many different seeds and build templates already exist, so […]
Creating an ASP.NET Core 1.1 VS2017 Docker application
This blog shows how to setup a basic ASP.NET Core 1.1 application using Visual studio 2017 and Docker. Code: https://github.com/damienbod/AspNetCoreVS2017Docker 2017.02.03 Updated to VS2017 RC3 msbuild3 This article from Swaminathan Vetri demonstates how to setup everything for an ASP.NET Core 1.0 application. Now the application needs to be updated to ASP.NET Core 1.1. Open the […]
Implementing a Client White-list using ASP.NET Core Middleware
This article shows how a client safe-list could be implemented using ASP.NET Core middleware checking the Remote IP address of the request. If the client IP is on the safe-list, no restrictions exist. Code: https://github.com/damienbod/ClientIpAspNetCoreIIS History 2018-08-30 Updated to .NET core 2.1 and added support for IP6 The middleware uses an admin white-list parameter from […]
