Posts

ASP.NET Core 6: Using Role Based Security for ASP.NET Core 6 WEB API

Image
In this article, we will see the complete implementation of the Role-Based Security for ASP.NET Core 6 WEB API. While building the FullStack application, we need to make sure that the Front-End application e.g. Angular, React.js. VueJS, Blazor, should access the WEB API securely by using a well-defined Authentication and Authorization mechanism. I have already published articles on ASP.NET Core WEB API Token-Based authentication on the following links ASP.NET Core 5 and Blazor Web Assembly Apps: Token Based Authentication in ASP.NET Core 5 APIs and Authenticating it using Blazor WebAssembly Apps (webnethelper.com) Understanding Token Based Authentication in ASP.NET Core 3.1 using JSON WEB TOKENS (webnethelper.com) Authenticating Angular 8 Client Application with JSON WEB Token (JWT) Based Authentication (webnethelper.com) In ASP.NET Core, the Policy-Based Authentication allows to club roles into a group and we can set the access policies of the API methods to these groups. We can provi

ASP.NET Core 6: Implementing a Localization in ASP.NET Core 6

Image
In this article, we will implement Localization in ASP.NET Core 6. In web application development if the website has multilingual support then it can reach a wider audience. One of the best and most important features of the ASp.NET Core is the availability of middlewares for localizing the application into different languages and cultures. The application localization involves the following features Provide localized resources for the languages and cultures Provide a strategy to select the culture and language for every request Making the application content localizable Resource Files A Resource file is a useful mechanism for defining the localizable strings for the text-based values that will be shown on the User Interface. Resource file has a .resx extension. We can store the translated strings in this file. We need to create these resource files for each localized language.  ASP.NET Core provides middleware and service to use the localization using Microsoft.Extensions.Localization