private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action)
 {
     IPAddressFilterAttribute attribute = new IPAddressFilterAttribute(
         new IPAddressRange[] {
         new IPAddressRange("94.123.252.5", "94.130.252.100"),
         new IPAddressRange("94.201.252.5", "94.201.252.90"),
         new IPAddressRange("94.201.242.1", "94.201.242.101"),
         new IPAddressRange("34.201.232.5", "54.201.242.200"),
         }, action);
     return Common.IsIPAddressAllowed(attribute, requestIP);
 }
示例#2
0
        private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action)
        {
            IPAddressFilterAttribute attribute = new IPAddressFilterAttribute(
                new IPAddressRange[] {
                new IPAddressRange("94.123.252.5", "94.130.252.100"),
                new IPAddressRange("94.201.252.5", "94.201.252.90"),
                new IPAddressRange("94.201.242.1", "94.201.242.101"),
                new IPAddressRange("34.201.232.5", "54.201.242.200"),
            }, action);

            return(Common.IsIPAddressAllowed(attribute, requestIP));
        }
 private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action)
 {
     IPAddressFilterAttribute attribute =
         new IPAddressFilterAttribute(new string[] {
                    "94.201.252.21",
                    "94.201.252.22",
                    "94.201.252.23",
                    "94.201.252.24",
                    "94.201.252.25", //Matching IP
                    "94.201.252.26",
                    "94.201.252.27"
     }, action);
     return Common.IsIPAddressAllowed(attribute, requestIP);
 }
示例#4
0
        private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action)
        {
            IPAddressFilterAttribute attribute =
                new IPAddressFilterAttribute(new string[] {
                "94.201.252.21",
                "94.201.252.22",
                "94.201.252.23",
                "94.201.252.24",
                "94.201.252.25",            //Matching IP
                "94.201.252.26",
                "94.201.252.27"
            }, action);

            return(Common.IsIPAddressAllowed(attribute, requestIP));
        }
示例#5
0
 public static bool IsIPAddressAllowed(IPAddressFilterAttribute attribute, string ip)
 {
     return((bool)typeof(IPAddressFilterAttribute).GetMethod("IsIPAddressAllowed", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(attribute, new object[] { ip }));
 }
示例#6
0
 public static bool IsIPAddressAllowed(IPAddressFilterAttribute attribute, string ip)
 {
     return (bool)typeof(IPAddressFilterAttribute).GetMethod("IsIPAddressAllowed", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(attribute, new object[] { ip });
 }
示例#7
0
        private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action)
        {
            IPAddressFilterAttribute attribute = new IPAddressFilterAttribute(new IPAddressRange("94.201.252.5", "94.201.252.90"), action);

            return(Common.IsIPAddressAllowed(attribute, requestIP));
        }
 private bool CheckIPAddress(string requestIP, IPAddressFilteringAction action)
 {
     IPAddressFilterAttribute attribute = new IPAddressFilterAttribute("94.201.252.25", action);
     return Common.IsIPAddressAllowed(attribute, requestIP);
 }