private bool InvalidIp() { var ip = RequestUtility.GetCurrentIpAddress(); foreach (var validIpRange in ValidIpRanges) { if (RequestUtility.IsInRange(validIpRange.Key, validIpRange.Value, ip)) { return(false); } } return(true); }