Walter.Web.FireWall
OnFireWallCreated Event
Example 
Walter.Web.FireWall Assembly > Walter.Web.FireWall Namespace > IFireWallConfig Interface : OnFireWallCreated Event
Update the firewall's Configuration when the firewall is created at runtime
Syntax
event EventHandler<FireWallCreatedEventArgs> OnFireWallCreated
Event Data

The event handler receives an argument of type FireWallCreatedEventArgs containing data related to this event. The following FireWallCreatedEventArgs properties provide information specific to this event.

PropertyDescription
Gets access to the fire wall that has been created.  
Remarks
This event is invoked when the firewall is completely loaded as well as all add-ons and firewall state.
Example
The below example will get called if the firewall and all plugin's are configured correctly
services.AddFireWall(FireWallTrial.License, FireWallTrial.DomainKey
                   , domainName: new Uri("https://www.your-domain.com", UriKind.Absolute)
                   , options =>{
                     options.OnFireWallCreated+=(sender,args)=> {
                         //get the current configuration
                         var json=  JsonConvert.SerializeObject(args.FireWall.Configuration);
                         //get filename in the root of the application
                         var fileName = Path.Combine(new FileInfo(this.GetType().Assembly.Location).DirectoryName
                                                    ,"last known good firewall configuration.json");
                           //tell firewall to write it to disk as uncontrolled changes to disk will raise an incident
                            args.FireWall.WriteFile(new FileInfo(fileName), json);
                         };
                    });
Requirements

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

See Also