Click here to Skip to main content
15,867,964 members
Please Sign up or sign in to vote.
5.00/5 (3 votes)
Hi Everybody,

Please help me, How can I block any country to showing my website( I want to block particular country, by which the site blocked in that countries.

I have one solution to add IP in web.config, But it is too lengthy for enter a wide range to add it, and also time to time update.

Is there any shortcut for blocking country.and if not then how block IP range in web.config.

And Please Give me any Link, by which I can collect updated country wise IP range.

Thank's in advance.
Posted

Read this very good walkthrough and see if it helps:
http://blog.newagesolution.net/2008/11/how-to-block-country-and-ip-addresses.html[^]
 
Share this answer
 
Comments
[no name] 27-Sep-12 0:00am    
I already read it ,
IpBlockerConfigurationSection not found error shows
A solution which I find & apply code in master page of asp.net which track the website viewer IP address and then check it in our database of ip address (converted to a number, then we can check range of that number in our database) of whole country then Redirect it to a error page(html) access denied.


I uploading code for it, very soon..on my blog
Hemant Singh Rautela- Developers Blog[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900