Is it possible to configure a location in Web.config to only allow local connections
- by gatapia
Hi All,
I've got a page in an ASP.Net app (its Mvc actually but not important) and I would like to only allow connections to this page from the local machine. I would love to do something like this in Web.config:
<location path="resources"><system.web><authorization><allow ips="local"/></authorization></system.web></location>
I know this is possible with a simple check in the page code behind (or controller) and its even possible just with IIS configuration but I would love a Web.config config as this would be the most elegant solution in my opinion. Anyone know if this is possible?
Thanks
Guido