windows firewall c# api code example

Example: firewall c#

//nuget package Walter.Web.Firewall.Core.3.x
services.AddFireWall(FireWallTrail.License, FireWallTrail.DomainKey
       , domainName: new Uri("https://www.your-domain.com", UriKind.Absolute)
       , options =>
       {
           options.Cypher.ApplicationPassword = "123456$even";
           options.ApplicationName = "Name as used for reporting";
           options.ApplicationTag = "ITIL Tag";
           options.Rules.BlockRequest.BlockDuration.SlideExpiration = true;
           options.Rules.BlockRequest.BlockDuration.Expires = TimeSpan.FromSeconds(10);

           //used by JavaScript in the browser
           options.WebServices.IsUserApiUrl = new Uri(Links.IsUserEndpoint, UriKind.Relative);
           options.WebServices.RegisterLinksApiUrl = new Uri(Links.SiteMapEndPoint, UriKind.Relative);
           options.WebServices.BeaconApiUrl = new Uri(Links.BeaconPoint, UriKind.Relative);

   });

   services.AddMvc(options =>
       options.Filters.Add<Walter.Web.FireWall.Filters.FireWallFilter>()
   );