Reputation: 11
I wanted to know how to restrict one WEB API method to be called from single IP by IIS or web.config. My application developed with ASP.NET WEB API. I can't make code changes at this moment(to add IPFilter as Attribute or CORS implementation )
Regards, Srikanth
Upvotes: 1
Views: 1838
Reputation: 117
You can use the IIS "IP Address and Domain Restrictions" option to Allow/deny the site/API to specific IP .
In windows 10 this applet can be installed from the
Control Panel-> turn Windows Feature On or off -> Internet Information Server-> World Web Services->Security-> IP Security
In Windows server it can be enabled from the "Server Manager".
Refer below for the details.
Upvotes: 1