public sealed class BlockDurationAttribute : System.Attribute
public sealed class BlockDurationAttribute : System.Attribute
using Microsoft.AspNetCore.Mvc; namespace MyProject.Controllers { using Walter.Web.FireWall; using Walter.Web.FireWall.Annotations; using Walter.BOM.Geo; [Geo(blockLocation: GeoLocation.AFRICA | GeoLocation.LATIN_AMERICA | GeoLocation.Netherlands)] [User(allow: UserTypes.IsHuman | UserTypes.IsSearchEngine)] [BlockDuration(duration: 60, sliding: true, doubleDurationPerIncident: true)] public sealed class HomeController : Controller { private readonly ILogger<HomeController> _logger; public HomeController(ILogger<HomeController> logger) { _logger = logger; } public IActionResult Index() { return View(); } public IActionResult Privacy() { return View(); } [Ignore] [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public IActionResult Error() { return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); } } }
System.Object
System.Attribute
Walter.Web.FireWall.Annotations.BlockDurationAttribute
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
BlockDurationAttribute Members
Walter.Web.FireWall.Annotations Namespace
System.Attribute
View the IPageRequest.ViolationsStack to access all violations on the page including those raised by this filter
IFireWall.OnGuardAction: Will be raised if the firewall considers blocking and allows you to override the blocking action
IFireWall.OnIncident: Will be raised if the firewall considers generating an incident and allows you to override the incident registration