Skip to main content

Posts

Showing posts with the label Asp.NetCore6

Implementing AspNetCore Identity Authentication In To An Existing Blazor Server App[.NET6]

In this article, we will implement AspNetCore Identity Authentication into an existing Blazor Server app. Microsoft AspNetCore Identity Library: AspNetCore Identity: Built-in login functionality library that supports authentication of all different .NET applications. Provides rich authentication UI pages and customizable as well. Adoptable for external authentication providers like 'Google', 'Facebook', 'Outlook'. Can be integrated with other authentications like 'IdentityServer4', 'Azure Active Directory', 'Azure Active Directory B2C(Azure AD B2C)'. Blazor Server Project With No Authentication: Our goal is to implement the AspNetCore Identity Authentication manually into an existing Blazor Server application(the project doesn't have authentication). So to accomplish our demo let's create a Blazor server application without any authentication. We can use either Visual Studio 2022 or Visual Studio Code(using .NET CLI commands)

Use Azure Cache For Redis In AspNetCore Application Using Distributed Cache Technique[.NET6]

In this article, we are going to do a small demo on integrating Azure Redis Cache into the AspNetCore Application using Distributed cache technique. Redis Cache: Redis is an open-source in-memory data structure store, used as a database, cache. It supports data structures such as strings, hashes, lists, sets, stored sets with range queries, etc. Let's understand the flow of Redis cache in a web application: Users request a page from the web application. Web application queries the Redis store, if the data exists, then fetches the data and returns the response directly to the user. If no data is in the Redis store, the application queries the database and fetches the data, next save the same data into the Redis store so that subsequent user request can consume the data from the Redis store directly, finally returns the response to the users. Create A Azure Redis Cache: Step:1 Create and sign-in into the Azure portal(https://portal.azure.com/) Step:2 On the Azure portal home page

A Demo On Azure AD B2C Authentication In MVC Application[.NET 6]

In this article, we are going to do a demo on Azure AD B2C authentication in the MVC application[.NET 6]. Azure AD B2C Configuration Steps: Step1: Login into Azure Portal( https://portal.azure.com/ ) Step2: Chose the directory that has the subscription(eg: free, student, pay-as-you-go, etc). (1) Select the 'Directories + Subscriptions' on the azure portal menu. (2) Left side menu select 'Directories + Subscriptions'. Bottom select 'All Directories' tab where we can select all directories we have the option to 'switch'. Here I have only one directory that has my subscription. So if we have multiple directories then we can see a 'switch' option. Step 3: The 'Microsoft.AzureActiveDirectory' resource provider needs to register with our 'subscription'. (1) On the Azure portal home page select 'Subscriptions'. (2) Now select your appropriate subscription. (3) Search 'Resource Provider' and then 'Microsoft.AzureAc