Click here to Skip to main content
13,590,079 members
Rate this:
Please Sign up or sign in to vote.
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 26-Sep-12 17:52pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Read this very good walkthrough and see if it helps:[^]
hemantrautela 27-Sep-12 0:00am
I already read it ,
IpBlockerConfigurationSection not found error shows
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

A solution which I find & apply code in master page of 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[^]

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web04 | 2.8.180618.1 | Last Updated 21 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100