ASP.NET MVC
Add IP Address Filter on Controller or Action in ASP.NET Core
First of all create a action filter like below: <pre> At appsettings.json include your whitelist IPAddress: Inside the ConfirueService method at Startup.cs add below code to provide whitelisted IPAddress: Finally add the filter where you required. Here I apply an action Get.