Author Archives: damienbod

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 Implicit Flow using OpenIddict and Angular

This article shows how to implement the OpenID Connect Implicit Flow 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/AspNetCoreOpeniddictAngularImplicitFlow Three different projects are used to implement the application. The OpenIddict Implicit Flow Server is used to authenticate and authorise, the resource […]

.NET Core, ASP.NET Core logging with NLog and PostgreSQL

This article shows how .NET Core or ASP.NET Core applications can log to a PostgreSQL database using NLog. Code: https://github.com/damienbod/AspNetCoreNlog Other posts in this series: ASP.NET Core logging with NLog and Microsoft SQL Server ASP.NET Core logging with NLog and Elasticsearch Settings the NLog database connection string in the ASP.NET Core appsettings.json .NET Core logging […]

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 […]

Testing an ASP.NET Core MVC Protobuf API using HTTPClient and xUnit

The article shows how to test an ASP.NET Core MVC API using xUnit and a HTTPClient client using Protobuf for the content formatters. Code: https://github.com/damienbod/AspNetMvc6ProtobufFormatters Posts in this series: ASP.NET Core Using Protobuf Formatters Testing an ASP.NET Core MVC Protobuf API using HTTPClient and xUnit The test project tests the ASP.NET Core API produced here. […]

.NET Core logging to MySQL using NLog

This article shows how to log to MySQL in a .NET Core application using NLog. Code: https://github.com/damienbod/AspNetCoreNlog NLog posts in this series: ASP.NET Core logging with NLog and Microsoft SQL Server ASP.NET Core logging with NLog and Elasticsearch Settings the NLog database connection string in the ASP.NET Core appsettings.json ASP.NET Core, logging to MySQL using […]

Implementing an Audit Trail using ASP.NET Core and Elasticsearch with NEST

This article shows how an audit trail can be implemented in ASP.NET Core which saves the audit documents to Elasticsearch using NEST. Code: https://github.com/damienbod/AspNetCoreElasticsearchNestAuditTrail 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 this use case. I […]