Walter.Web.FireWall
RenderView<TModel> Method
Example 
Walter.Web.FireWall Assembly > Walter.Web.FireWall Namespace > IFireWall Interface : RenderView<TModel> Method
the data type
the name of the view in located in ~/views/shared/
the data to use as model in the view
if true render the view as partial
Render a razor view using a firewall reporting model
Syntax

Parameters

viewName
the name of the view in located in ~/views/shared/
viewData
the data to use as model in the view
renderPartial
if true render the view as partial

Type Parameters

TModel
the data type

Return Value

empty string if failed or the rendered HTML by the razor page
Exceptions
ExceptionDescription
View name must be provided
Model must be provided
Remarks
To use Template rendering you need to use the extension method UseRazorTemplates() in your firewall service registration
Example
for more samples download getting started manual from www.asp-waf.com/download/ASP-WAF-FireWall-Getting-Started.pdf
services.AddFireWall(FireWallTrial.License, FireWallTrial.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);
            }).UseRazorTemplates(options=>{
            options.EmailReportView="EMailTemplate";
            options.EmailReportView=string.Empty;
            }).UseSMTPReportingDatabase(DatabaseConnections.FireWallMail, options =>
            {
            options.Archive = TimeSpan.FromDays(180);
            options.Server = "mail.your-mail-domain.com";
            options.UserName = "userName";
            options.Password = "smtpPassword";
            options.Port = 25;
            options.From = "noreply@your-domain.com";
            options.IgnoreServerCertificateErrors = true;
            options.DefaultEmail = "webmaster@your-domain.com";
            options.Archive = TimeSpan.FromDays(60);
            options.MailingList.AddRange(new[] {
            new EMailAddress("Security Admin","security@your-domain.com") {
            Frequency= TimeSpan.FromHours(1),
            Roles= EMailRoles.FireWallAdministrationViolations | EMailRoles.UnauthorizedPhysicalFilesViolation }
            );
            });
            services.AddMvc(options =>
            options.Filters.Add<Walter.Web.FireWall.Filters.FireWallFilter>()
            );
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

Reference

IFireWall Interface
IFireWall Members