Class IPFilterController
Controller to manage IP Filters.
Implements
Inherited Members
Namespace: DotNetNuke.Entities.Host
Assembly: DotNetNuke.dll
Syntax
public class IPFilterController : ComponentBase<IIPFilterController, IPFilterController>, IIPFilterController
Methods
| Improve this Doc View SourceAddIPFilter(IPFilterInfo)
Adds an IP filter.
Declaration
public int AddIPFilter(IPFilterInfo ipFilter)
Parameters
Type | Name | Description |
---|---|---|
IPFilterInfo | ipFilter | The informations about the IP filter to add. |
Returns
Type | Description |
---|---|
System.Int32 | The ID of the newly created integer. |
CanIPStillAccess(String, IList<IPFilterInfo>)
Gets a value indicating whether an IP address has access.
Declaration
public bool CanIPStillAccess(string myip, IList<IPFilterInfo> filterList)
Parameters
Type | Name | Description |
---|---|---|
System.String | myip | The IP address to check. |
IList<IPFilterInfo> | filterList | A list of filters to check against. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the IP is authorized. |
DeleteIPFilter(IPFilterInfo)
Deletes an IP filter.
Declaration
public void DeleteIPFilter(IPFilterInfo ipFilter)
Parameters
Type | Name | Description |
---|---|---|
IPFilterInfo | ipFilter | The informations about the IP filter to delete. |
GetIPFilter(Int32)
Gets a single IP filter.
Declaration
public IPFilterInfo GetIPFilter(int ipFilter)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | ipFilter | The ID of the IP filter to get. |
Returns
Type | Description |
---|---|
IPFilterInfo |
IsAllowableDeny(String, IPFilterInfo)
Gets a value indicating whether an IP address can be denied.
Declaration
public bool IsAllowableDeny(string currentIP, IPFilterInfo ipFilter)
Parameters
Type | Name | Description |
---|---|---|
System.String | currentIP | |
IPFilterInfo | ipFilter | The IP filter against which to check. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the IP address can be denied. |
IsIPAddressBanned(String)
Gets a value indicating whether a given IP address is banned.
Declaration
public void IsIPAddressBanned(string ipAddress)
Parameters
Type | Name | Description |
---|---|---|
System.String | ipAddress | A string representation of an IP address. |
IsIPBanned(String)
Gets a value indicating whether a given IP address is banned.
Declaration
public bool IsIPBanned(string ipAddress)
Parameters
Type | Name | Description |
---|---|---|
System.String | ipAddress | A string representation of an IP address. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating wheter the provided IP address is banned. |
UpdateIPFilter(IPFilterInfo)
Updates an existing IP filter.
Declaration
public void UpdateIPFilter(IPFilterInfo ipFilter)
Parameters
Type | Name | Description |
---|---|---|
IPFilterInfo | ipFilter | The informations about the IP filter to update. |
Explicit Interface Implementations
| Improve this Doc View SourceIIPFilterController.GetIPFilters()
Gets all the IP filters.
Declaration
IList<IPFilterInfo> IIPFilterController.GetIPFilters()
Returns
Type | Description |
---|---|
IList<IPFilterInfo> | A collection of IPFilterInfo. |