This is a quick post to show how easy it is to sign and validate JWT auth tokens in .NET 7.0 without using the built-in Core Identity membership system.
This post shows goes through the steps to connect a .NET 6 API to SQLite using Entity Framework Core, and automatically create/update the SQLite database from code using EF Core migrations.
This post shows goes through the steps to connect a .NET 6 API to PostgreSQL using Entity Framework Core, and automatically create/update the PostgreSQL database from code using EF Core migrations.
This post shows goes through the steps to connect a .NET 6 API to MySQL using Entity Framework Core, and automatically create/update the MySQL database from code using EF Core migrations.
This post shows goes through the steps to connect a .NET 6 API to SQL Server using Entity Framework Core, and automatically create/update the SQL Server database from code using EF Core migrations.
How to build a boilerplate .NET 6.0 API that supports email sign up, verification, authentication, role based access control, forgot password, reset password and account management (CRUD) functionality.
A step by step tutorial on how to build a minimal .NET 6.0 API from scratch with a couple of example endpoints/routes, with details on every line of code and configuration to show how it all fits together.
This is a super quick example of how to automatically migrate database changes on startup from code in .NET 6.0 using Entity Framework in the Program.cs file.
This is a quick example of how to create and validate JWT tokens in .NET 6.0. We'll also cover how to implement custom JWT authentication using custom JWT middleware and a custom authorize attribute.
This is a quick example of how to hash and verify passwords in .NET 6.0 using the BCrypt.Net-Next password hashing library, a C# implementation of the bcrypt password hashing function.
How to build a .NET 6.0 API that supports user registration, login with JWT authentication and CRUD operations. Includes example client apps built with Angular, Blazor, React & Vue.
In this post we'll go through the steps to connect a .NET API to MySQL using Entity Framework Core, and to create a MySQL database from code using EF Core migrations.
In this post we'll go through the steps to connect a .NET API to SQL Server using Entity Framework Core, and to create a SQL Server database from code using EF Core migrations.
The Startup class configures the services available to the .NET Dependency Injection (DI) container in the ConfigureServices() method, and configures the .NET request pipeline for the application in the Configure() method.
The Main method is the entry point for a .NET application, when an app is started it searches for the Main method to begin execution. The method can be located anywhere in a project but is typically placed in the Program class.
How to build a boilerplate .NET 5.0 API that supports email sign up, verification, authentication, role based access control, forgot password, reset password and account management (CRUD) functionality.
A step by step tutorial on how to build a simple bare bones .NET 5.0 API from scratch with a couple of example endpoints/routes, with details on every line of code and configuration to show how it all fits together.
This is a quick example of how to create and validate JWT tokens in .NET 5.0. We'll also cover how to implement custom JWT authentication using custom JWT middleware and a custom authorize attribute.
This is a quick example of how to hash and verify passwords in .NET 5.0 using the BCrypt.Net-Next password hashing library, a C# implementation of the bcrypt password hashing function.
This tutorial shows how to build a .NET 5.0 API that supports user registration, login with JWT authentication and user CRUD operations. Includes example client apps built with Angular, Blazor, React & Vue.
In this tutorial we'll go through an example of how to build a simple user registration, login and user management (CRUD) application with Blazor WebAssembly.
This is a quick post to show how you can add a couple of simple extension methods to the NavigationManager class in your Blazor WebAssembly app for accessing query string parameters in the URL.
This is a quick example of how to setup form validation in ASP.NET Core Blazor WebAssembly. The example is a simple registration form with pretty standard fields for title, first name, last name, date of birth, email, password, confirm password and an accept terms and conditions checkbox.
This is a quick example of how to create and validate JWT tokens in ASP.NET Core 3.1. We also cover how to implement custom JWT authentication with custom JWT middleware and a custom authorize attribute.
A quick example of how to hash and verify passwords ASP.NET Core 3.1 using the BCrypt.Net-Next password hashing library which is a C# implementation of the bcrypt password hashing function.
How to build a boilerplate authentication API with ASP.NET Core 3.1 that includes email sign up & verification, authentication & role based authorization, forgot password & reset password functionality, account management (CRUD) routes with role based access control, and Swagger documentation.
This is a super quick example of how to automatically migrate database changes from code in ASP.NET Core using Entity Framework Core from the Startup.cs file.
How to build an API with role based authorization / access control in ASP.NET Core 3.1 & C#. Includes example client apps built with Angular, React and Vue.
Simple boilerplate ASP.NET Core 3.1 API that supports User Registration, Login and User Management. Uses SQLite in development & SQL Server in production and includes example client apps built with React, Angular & Vue.
How to build an API with role based authorization / access control in ASP.NET Core 2.2 & C#. Includes example client apps built with Angular, React and Vue.
I stumbled across the Dynamic LINQ Library today and can't figure out why more people aren't talking about it.
It's an awesome little library that allows you to dynamically generate LINQ expressions from strings, which is perfect for things like sorting collections by object property names passed as querystring parameters to web api controllers, it even allows you to sort by child object property names!
I got an email from a client today about an error happening in an application that I'd built with ASP.NET Web API 2.1. At first I thought they must be mistaken or doing something wrong on their end because their weren't any errors being reported by ELMAH which I'd configured in my WebApiConfig.cs file using the ElmahHandleErrorApiAttribute filter.
This post shows you how to create a custom authorization attribute which allows you to pass in a list of enums as parameters to restrict access by role. I'm using this attribute on the controllers of a RESTful Web API built with ASP.NET WEB API 2.
I recently set up an Instagram feed for a travel blog and found that the Instagram API only supplies the UTC created date/time of each image, and doesn't supply the user's UTC Offset (as the Twitter API does), so the only thing you have to work with are the latitude and longitude (lat/long) coordinates to find out the timezone and UTC Offset of where the image was posted.
With the release of ASP.NET MVC 4 and Web Api, creating JSON web services has never been easier, which makes it perfect for populating jQuery DataTables via Ajax.
This is an extension method for creating a checkbox list for a list of enum values (IList<Enum>).
It's a modified version of the CheckboxListForEnum extension method I found on the Xango project. Their version creates a checkbox list for a property that contains a single enum value.
In this post I'll show you how to install and configure the Altairis Web Security Toolkit in an MVC3 application. The Altairis Web Security Toolkit is a simple, easy to use ASP.NET Membership Provider with a clean table structure. It's much nicer to work with than the default ASP.NET Membership Provider.
I'm writing an application that uses NHibernate as the data layer, but is required to integrate with an existing Umbraco system. Specifically, I have a User class that needs to map to an Umbraco member.