Click or drag to resize
BannedIPInfoProvider Class
Class providing BannedIPInfo management.
Inheritance Hierarchy
SystemObject
  CMS.DataEngineAbstractInfoProviderBannedIPInfo, BannedIPInfoProvider, ObjectQueryBannedIPInfo
    CMS.DataEngineAbstractInfoProviderBannedIPInfo, BannedIPInfoProvider
      CMS.ProtectionBannedIPInfoProvider

Namespace: CMS.Protection
Assembly: CMS.Protection (in CMS.Protection.dll) Version: 12.0.0
Syntax
C#
public class BannedIPInfoProvider : AbstractInfoProvider<BannedIPInfo, BannedIPInfoProvider>

The BannedIPInfoProvider type exposes the following members.

Constructors
  NameDescription
Public methodBannedIPInfoProvider
Top
Fields
Properties
  NameDescription
Protected propertyCachedBannedIPs
Contains denied IP address which accessed site from last change in banned IP info objects. Increases performance when attacker is spamming.
Public propertyDataSource
Data source for the provider
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected propertyGlobalBannedIPs
Stores global banned IPs and if it is allowed.
Public propertyHashtableSettings
Gets hashtable settings
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected propertyInfoObject
Info object instance the provider is working with.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public propertyIsValid
Indicates if the provider instance is up-to-date and can be used to manage object instances.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public propertyStatic memberLastChange
Returns time of the last change in banned IP settings.
Protected propertyLastChangeInternal
Returns time of the last change in banned IP settings.
Protected propertySitesBannedIPs
Stores site related banned IPs and if it is allowed.
Public propertyTypeInfo
Object type information.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Top
Methods
  NameDescription
Public methodStatic memberBanRedirect
Redirects current http response to special page for banned IPs (settings key CMSBannedIPRedirectURL).
Protected methodBeginTransaction
Creates a new transaction over this provider.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodBulkDelete
Bulk deletes info objects based on the given condition.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodBulkInsertInfos(IEnumerableBaseInfo)
Bulk inserts the given list of info objects
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodBulkInsertInfos(IEnumerableTInfo, BulkInsertSettings)
Bulk inserts the given list of info objects.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodStatic memberCheckBannedIP
Checks the current IP for being banned for web access
Public methodStatic memberCheckIPandRedirect
Check if IP address id allowed and if not redirects to the page specified in App settings, key CMSBannedIPRedirectURL.
Public methodCheckUniqueCodeName
Checks if the object has unique code name. Returns true if the object has unique code name.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodCheckUniqueValues
Checks if a record with the same column values already exists in the database. Returns true if the set of values is unique.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodClearHashtables
Clears the object's hashtables.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodCreateDefaultBulkInsertSettings
Creates bulk insert settings. By default CheckConstraints and TableLock flags are set.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodCreateInfo
Creates a new info object.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodCreateWebFarmTask(String, String)
Creates web farm task specific for current object and action name
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodCreateWebFarmTask(String, String, Byte, String)
Creates web farm task specific for current object and action name
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodStatic memberDeleteBannedIPInfo(Int32)
Deletes specified bannedIP.
Public methodStatic memberDeleteBannedIPInfo(BannedIPInfo)
Deletes specified bannedIP.
Protected methodDeleteInfo
Deletes the object to the database.
(Overrides AbstractInfoProviderTInfo, TProvider, TQueryDeleteInfo(TInfo).)
Protected methodDeleteObjectFromHashtables
Deletes the object instance from the hashtables.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodStatic memberGetBannedIPInfo
Returns the BannedIPInfo structure for the specified bannedIP.
Public methodStatic memberGetBannedIPs
Returns the query for all banned IPs.
Protected methodGetBannedIPsInternal
Returns the query for all banned IPs.
Protected methodGetDeleteQuery
Gets the object query that deletes all items matching the query parameters
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodGetInfoByCodeName(String, Boolean)
Gets an instance of info object based on the given code name.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodGetInfoByCodeName(String, Int32, Boolean)
Gets an instance of info object based on the given code name.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodGetInfoByCodeName(String, Int32, Boolean, Boolean)
Gets an instance of info object based on the given code name.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodGetInfoByCodeName(String, Int32, Int32, Boolean)
Gets an instance of info object based on the given code name.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodGetInfoByFullName
Gets an instance of info object based on the given full name.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodGetInfoByGuid(Guid, Boolean)
Gets an instance of info object based on the given GUID.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodGetInfoByGuid(Guid, Int32, Boolean)
Gets an instance of info object based on the GUID.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodGetInfoById
Gets the info by its ID.
(Overrides AbstractInfoProviderTInfo, TProvider, TQueryGetInfoById(Int32, Boolean).)
Protected methodGetInfosByIds
Gets the list of info objects by their IDs.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodGetObjectQuery
Gets the object query for the provider
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodGetObjectQueryInternal
Gets the object query for the provider
(Inherited from AbstractInfoProviderTInfo, TProvider.)
Public methodStatic memberGetRegularIPAddress
Returns regular expression corresponding to ip address.
Protected methodInit
Initializes the provider with the given type info and hashtable settings
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodInitHashtableSettings
Initializes the HashtableSettings based on typeInfo and using settings as default values.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodInitTypeInfoAndRegister
Initializes the provider variables.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodInvalidate
Sets this provider as invalid
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodStatic memberIsAllowed(String, BanControlEnum)
Returns true if client IP address (from HttpContext) is allowed to access the site, false if it is banned.
Public methodStatic memberIsAllowed(String, String, BanControlEnum)
Returns true if client IP address is allowed to access the site, false if it is banned.
Protected methodIsAllowedInternal
Returns true if client IP address is allowed to access the site, false if it is banned.
Public methodStatic memberIsBannedIPEnabled
Returns true if BannedIP module is enabled for specified site (Settings key).
Protected methodIsBannedIPEnabledInternal
Returns true if BannedIP module is enabled for specified site (Settings key).
Protected methodLoadAllInfos
Loads all infos to the hashtable
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodLoadCachedIPs
Load all banned ip from DB to Hash tables if not yet loaded.
Protected methodLoadInfos
Loads all objects from the database to memory.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodProcessWebFarmTask
Runs the processing of specific web farm task for current provider
(Overrides AbstractInfoProviderTInfo, TProvider, TQueryProcessWebFarmTask(String, String, Byte).)
Protected methodProcessWebFarmTaskInternal
Runs the processing of specific web farm task for current provider
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodRegisterObjectInHashtables
Registers the object instance within the hashtables.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodReloadCachedIPs
Reload all banned ip from DB to Hash tables.
Protected methodRemoveOriginalCodeNameFromHashtable
Removes the original object code name from the hashtable
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodSetAsDefaultProvider
Sets this provider instance as the default provider
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodStatic memberSetBannedIPInfo
Sets (updates or inserts) specified bannedIP.
Protected methodSetInfo
Inserts or Updates the object to the database.
(Overrides AbstractInfoProviderTInfo, TProvider, TQuerySetInfo(TInfo).)
Protected methodUpdateData(String, QueryDataParameters, String)
Updates the data in the database based on the given where condition.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodUpdateData(IWhereCondition, IEnumerableKeyValuePairString, Object, Boolean)
Updates the data in the database based on the given where condition.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Protected methodUpdateObjectInHashtables
Updates the object instance in the hashtables. Update is different than RegisterObjectInHashtables(TInfo), because it logs task about changing object.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Public methodValidateCodeName
Validates the object code name. Returns true if the code name is valid.
(Inherited from AbstractInfoProviderTInfo, TProvider, TQuery.)
Top
See Also