Tag Archives: aspnetcore

Using Protobuf Media Formatters with ASP.NET Core

Theis article shows how to use Protobuf with an ASP.NET Core MVC application. The API uses the WebApiContrib.Core.Formatter.Protobuf Nuget package to add support for Protobuf. This package uses the protobuf-net Nuget package from Marc Gravell, which makes it really easy to use a really fast serializer, deserializer for your APIs. Code: https://github.com/damienbod/AspNetCoreWebApiContribProtobufSample Setting up te […]

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

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

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