Reputation: 751
I'm new in Microsoft Azure and we are encountering problem in limiting access in specific page of our website to specific ip address. What we would like to do is only specific ip address can visit certain pages like /user, /admin. We don't know if there's a way in allowing specific ip using Web.Config.
I hope you can help me. Thank you
Upvotes: 2
Views: 901
Reputation: 1570
It is possible to do it in the web config: https://learn.microsoft.com/en-us/iis/configuration/system.webserver/security/ipsecurity/
Example: Is it possible to configure a location in Web.config to only allow local connections
If you want to allow specific IP address on a specific route, then you can create a custom IP filter attribute like this, and you can put it on your controllers: Restrict access to a specific controller by IP address in ASP.NET MVC Beta
Upvotes: 1
Reputation: 2088
I think you need to look at Application Gateway to restricte IP to a specific route.
https://learn.microsoft.com/en-us/azure/application-gateway/tutorial-restrict-web-traffic-powershell
Upvotes: 1