我有一个包含AdminController类的ASP.NET MVC项目,并给我这样的URls:
http://example.com/admin/AddCustomer http://examle.com/Admin/ListCustomers
http://example.com/admin/AddCustomer
http://examle.com/Admin/ListCustomers
我想配置服务器/应用程序,以便只能从192.168.0.0/24网络(即我们的LAN)访问包含/ Admin的 URI
我想将此控制器限制为只能从某些IP地址访问.
在WebForms下,/ admin /是一个物理文件夹,我可以在IIS中限制...但是使用MVC,当然,没有物理文件夹.这是使用web.config或属性实现的,还是我需要拦截HTTP请求来实现这一目标?
c# security asp.net-mvc authorization web-config
asp.net-mvc ×1
authorization ×1
c# ×1
security ×1
web-config ×1