Skip to main content


Showing posts with the label Core Mvc

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( ) 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

Localization In .NetCore MVC Application

Localization: The translation to a specific region or country or culture or local. The websites with localization can reach a wider range of audiences. Create A DotNet Core MVC Sample Application: Let's learn localization steps by implementing them in a sample MVC application. Add Sample Language Collection To AppSettings File: In our sample let's read the different languages that we support from the appSettings.json file. appSettings.Development.json: "LanguageCodes": [ { "Name": "Spain", "Code": "es" }, { "Name": "Mexico", "Code": "es-Mx" }, { "Name": "United States", "Code": "en-us" } ] Let's create a type for the "LanguageCodes". Shared/LanguageCodes: namespace Sample.Localization.Mvc.Shared { public class LanguageCodes { public string Name { get; set; } public string Code { get; set; } } } Register