/ Published in: XML
place web.config in which ever directory you would like to restrict
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?xml version="1.0"?> <configuration> <system.webServer> <security> <ipSecurity allowUnlisted="false"> <!-- this line blocks everybody, except those listed below --> <clear/> <!-- removes all upstream restrictions --> <add ipAddress="127.0.0.1" allowed="true"/> <!-- allow requests from the local machine --> <add ipAddress="83.116.19.53" allowed="true"/> <!-- allow the specific IP of 83.116.19.53 --> </ipSecurity> </security> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>