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 ReadingPolicy based authorization in ASP.NET 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 ReadingRestrict IP Address ASP.NET Core Web API

Restrict IP Address in ASP.NET 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, we will see how to restrict IP addresses in ASP.NET Web API. Check this Post for…

Continue ReadingRestrict IP Address in ASP.NET Web API