Auth0 to Azure AD B2C Migration – Part 2

We have already looked at an ASP.NET Core 2.2 application that leveraged Auth0 for authentication, we will now direct our attention to developing a similar application that leverages Azure Active Directory B2C (Azure AD B2C) for authentication. First we will need to create our Azure AD B2C tenant in the Azure portal. Login to the…

Auth0 to Azure AD B2C Migration – Part 1

In this series of articles we will look at converting an existing ASP.NET Core 2 Web Application from using Auth0 to using Azure AD B2C. This series of articles assumes you have some familiarity with Auth0 and Azure AD B2C, but just in case you don’t, below are several links that should get you caught…

Messages? Events? or Both?

Most of what I discuss here is culled from https://docs.microsoft.com/en-us/learn/modules/choose-a-messaging-model-in-azure-to-connect-your-services/2-choose-whether-to-use-message-queues-or-events. If you are building a distributed application you will want to ensure the application is both reliable and scalable. You will often leverage communication components to accomplish these objectives. This will necessitate a choice between messages, events or some combination of both? So how do you…

NET Core Web Api and Cosmos DB SDK 2.0 and 3.0

I created an example of a NET Core Web Api that makes use of both the Cosmos DB SDK 2.0 and 3.0. The example is based on an Order entity with multiple Order Item entities. It includes controller methods for working with Orders in both v1 and v2 of the API. Note, in v2 of the…

Logic Apps, Service Bus and Send Grid

In my endeavor to get a better understanding of Azure Logic Apps, I converted some existing code in one of my side projects from Azure Storage Queues and Azure Functions to Service Bus and Logic Apps. The code I was converting sends notifications to users. My code will send a message to a Service Bus…

Azure AD B2C ASP.NET Core Web App and Web Api … Finally!

I have been determined to get an example of a Web App and Web Api working together with Azure AD B2C. Much of the example is based on  https://github.com/Azure-Samples/active-directory-b2c-dotnetcore-webapp. While this is an excellent example, I wanted and example with a separate Web App and Web Api. The code can be found at https://github.com/mattruma/ADB2CWebAppWebApi. I will highlight…

Razor Pages Gotcha

I have been playing around with Razor Pages as of late, you can read more at https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-2.1&tabs=visual-studio. The main difference with Razor Pages and ASP.NET MVC is that the Razor Page includes both the model and the controller. It is more of an MVVM approach, that also includes two-way data binding. Anyway, I was struggling with…

Local Development with Azure Functions and Event Grid

For the past couple of days I have been working with Azure Functions and Event Grid.  The challenge I encountered was getting it so I could run and debug my Azure Functions locally, specifically the Even Grid Azure Function. Finally figured it out! For my example I am using two Azure Functions, the first is…

ASP.NET Core Service Lifetimes Explained

When leveraging Dependency Injection in ASP.NET Core you will want to choose an appropriate lifetime for each registered service. ASP.NET Core services can be configured with the following lifetimes: Transient Scoped Singleton Transient When in doubt, make it Transient. When you add a Transient service you are telling ASP.NET Core that each time the service…

Create Azure Web App with azure-cli

Start at https://shell.azure.com. Forcing my self to get better at using the command prompt as opposed to Azure Portal. These are a list of some of the azure-cli commands that I use frequently. List Locations To retrieve a list of available Azure regions use az account list-locations. Create Resource Group To create a resource group use…