Category SQLite

Secure a Blazor WASM ASP.NET Core hosted APP using BFF and OpenIddict

This article shows how to implement authentication and secure a Blazor WASM application hosted in ASP.NET Core using the backend for frontend (BFF) security architecture to authenticate. All security is implemented in the backend and the Blazor WASM is a view of the ASP.NET Core application, no security is implemented in the public client. The […]

Building and securing an ASP.NET Core API with a hosted Vue.js UI

This article shows how Vue.js can be used together with ASP.NET Core 3 in a single project. The Vue.js application is built using the Vue.js CLI and built to the wwwroot of the ASP.NET Core application. The ASP.NET Core application is used to implement the APIs consumed by the Vue.js UI. The application is secured […]

Using EF Core and SQLite to persist SignalR Group messages in ASP.NET Core

The article shows how SignalR messages can be saved to a database using EF Core and SQLite. The post uses the SignalR Hub created in this blog; SignalR Group messages with ngrx and Angular, and extends it so that users can only join an existing SignalR group. The group history is then sent to the […]

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

Adding SQL localization data using an Angular form and ASP.NET Core

This article shows how SQL localized data can be added to a database using Angular forms which can then be displayed without restarting the application. The ASP.NET Core localization is implemented using Localization.SqlLocalizer. This NuGet package is used to save and retrieve the dynamic localized data. This makes it possible to add localized data at […]

Creating and requesting SQL localized data in ASP.NET Core

This article shows how localized data can be created and used in a running ASP.NET Core application without restarting. The Localization.SqlLocalizer package is used to to get and localize the data, and also to save the resources to a database. Any database which is supported by Entity Framework Core can be used. Code: https://github.com/damienbod/AngularLocalizationAspNetCore 2018-08-01: […]

Authorization Policies and Data Protection with IdentityServer4 in ASP.NET Core

This article shows how authorization policies can be used together with IdentityServer4. The policies are configured on the resource server and the ASP.NET Core IdentityServer4 configures the user claims to match these. The resource server is also setup to encrypt a ‘Description’ field in the SQLite database, so it cannot be read by opening the […]

ASP.NET Core using SQL Localization

This article shows how to use SQL localization in ASP.NET Core using an SQL database. The SQL localization in the demo uses Entity Framework Core to access a SQLite database. This can be configured to use any EF core provider. Code: https://github.com/damienbod/AspNetCoreLocalization Library: https://github.com/damienbod/AspNetCoreLocalization/tree/master/src/Localization.SqlLocalizer NuGet package: https://www.nuget.org/packages/Localization.SqlLocalizer/ Documentation: http://localizationsqllocalizer.readthedocs.io/en/latest/ Posts in this series ASP.NET Core […]

Experiments with Entity Framework Core and an ASP.NET Core API

The article shows some of the ways in which Entity Framework Core can be used together with ASP.NET Core. Both packages run on dotnet which makes it possible to run on Linux, Mac or Windows operating systems. The Entity Framework providers are implemented in separate data access projects using onion architecture. Code: https://github.com/damienbod/AspNetCoreMultipleProject Posts in […]

OAuth2 Implicit Flow with AngularJS and ASP.NET Core 2.0 IdentityServer4

This article shows how to implement the OAuth2 Implicit Flow with an AngularJS client and IdentityServer4 hosted in ASP.NET Core 1.1. The code was built using the IdentityServer4.Samples. Thanks to everyone who helped in creating IdentityServer. Code: https://github.com/damienbod/AspNet5IdentityServerAngularImplicitFlow History: 2017-08-15: Updated ASP.NET Core 2.0, Angular 4.3.6 Full history: https://github.com/damienbod/AspNet5IdentityServerAngularImplicitFlow#history Other posts in this series: OAuth2 […]