Author: rednelo | Posted on: 6/8/2010 9:43:10 PM | Views : 380

I have a client who wants me to block his site from certain countries.  Each month I add all the new IP address ranges for these countries into a sql database.  If the user has a blocked IP address, the site directs them to a phoney 504 error page.  This way it doesn't appear that the site is being blocked, but rather is just having difficulites.  Thats the way we want it.
It works fine however, there are some users (5%) who get a 500 error.  No rhyme or reason.  It works across all browsers and operating systems.   I have no way of finding out why from my hosting service.  I can't dupliate it.
I have the following code that runs at Page_Init
Here is the code can somebody look at it.  Thanks in advance.:
Private Sub blockip() 'Get the list of blocked IPs Dim conn As SqlConnection Dim comm As SqlCommand ...

Go to the complete details ...