I am testing my ASP.net website online, but I don't want it to be accessible to anyone, just from my IP address. How I can return 404 or something for people that aren't from my IP address. Developing my site in ASP.net 4 and C#. Or whether it can be done in IIS 7.5.
Asked
Active
Viewed 278 times
2 Answers
4
You can use <ipsecurity>
restrictions.

mellamokb
- 56,094
- 12
- 110
- 136
-
what I add to '
– Liron Harel Jul 06 '12 at 15:39
3
Verify if you have IP and Domain Restrictions Role
- Open the Server Manager by selecting the path Start > Administrative Tools > Server Manager.
- Click "Add Role Services" link to add the required Role. Check the "IP and Domain Restrictions" check box in "Select Role Services" screen and click "Next" to continue.
Enable IP and Domain Restrictions
- Open IIS 7.5
- Choose the website you want to filter IPs on (on the left panel)
- Click on IP Address and Domain Restrictions (in the center panel)
Add Allow Entry, and set your IP address
click the Edit Feature Setting on the Actions panel
- select Deny Access for unspecified clients.

Emanuele Greco
- 12,551
- 7
- 51
- 70