Policy based authorization in ASP.NET Core

In my previous article, I explained about restricting users based on the IP Address.  It was implemented by using a whitelist of IP Address and middleware.  Obviously, that solution helps authorize users on the application level.  I also promised another article to explain about restricting users on a controller level or action level.  Policy-based authorization is a new feature introduced in Dotnet Core. This allows you to implement the application authorization rules in code.  In…

Continue Reading Policy based authorization in ASP.NET Core

Create NuGet Package and Publish in Dotnet Core

Most of us use NuGet packages in our projects and we are familiar with the procedure of adding a NuGet package to a project.  Have you ever wondered how to create NuGet package?  Let’s discuss in detail how to create and publish NuGet Package. Introduction to NuGet NuGet is a free and open-source package manager designed for the Microsoft development platform.  It is a .NET alike of NPM packages.  A whole library can be encapsulated…

Continue Reading Create NuGet Package and Publish in Dotnet Core

Versioning Web API

Change is an inevitable factor in the life cycle of an API.  More and more organizations today face a dynamic and changing environment.  The change is driven by factors within the enterprise like implement a new business model, expand to a new market. It can also be external such as disruptive technologies, new government regulations, changes happen in partner/consumer organization, etc. I will talk about versioning in general and versioning Web API using multiple versioning…

Continue Reading Versioning Web API

Using Google Translation API with Dotnet Core

Recently I worked on a proof of concept with a requirement of language translation in a Web application. There are a lot of Language translation services available in the market but most of them failed with more than one parameters I checked for.  The parameters I used for this study are Quality, Performance, Pricing, Ease of integration, Languages supported.  As part of the exercise, I tried integrating some of the leading translation services with the…

Continue Reading Using Google Translation API with Dotnet Core

Restrict IP Address ASP.NET Core Web API

There are several ways to restrict access to a Web server based on the requestor’s IP address.  We can do that from IIS or using inbound Firewall rules. But If you want to restrict access to one of the applications deployed in the server based on the IP Address then you have to achieve that programmatically.  In this post, I will guide you on how to restrict IP address in ASP.NET Core Check this post…

Continue Reading Restrict IP Address ASP.NET Core Web API