Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET web.Config
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 18:52pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Read this very good walkthrough and see if it helps:
http://blog.newagesolution.net/2008/11/how-to-block-country-and-ip-addresses.html[^]
  Permalink  
Comments
hemantrautela at 27-Sep-12 0:00am
   
I already read it ,
IpBlockerConfigurationSection not found error shows
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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[^]
  Permalink  
v3

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

  Print Answers RSS
0 OriginalGriff 195
1 ProgramFOX 130
2 Maciej Los 105
3 Sergey Alexandrovich Kryukov 85
4 Afzaal Ahmad Zeeshan 82
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 21 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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