Dim UserIP as String
Dim flag as Integer = 0
Dim arrayIPs(1) as String
arrayIPs(0) = "127.0.0.01"
arrayIPs(1) = "100.45.76.80"
UserIP = Request.ServerVariables("LOCAL_ADDR")
For i = 0 to arrayIPs.Length-1
If UserIP = arrayIPs(i) Then
flag = flag + 1
End If
Next
If (flag <> 0) then
MessageBox.Show("You are not an authorized user to access this website")
Else
MessageBox.Show("Valid Users")
End If