Is it possible to configure a location in Web.config to only allow local connections
Posted
by gatapia
on Stack Overflow
See other posts from Stack Overflow
or by gatapia
Published on 2010-02-25T21:38:21Z
Indexed on
2010/03/31
8:53 UTC
Read the original article
Hit count: 349
ASP.NET
|web-config
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
© Stack Overflow or respective owner