ASP.NET Framework Installation
Install ByteHide Monitor in your ASP.NET Framework application for runtime web protection.
Requirements
- .NET Framework 4.6.2 or later
- NuGet:
ByteHide.Monitorpackage - ASP.NET Web API or MVC application
Step 1: Install the Package
Via NuGet Package Manager Console:
CODE
Install-Package ByteHide.MonitorInstall-Package ByteHide.MonitorOr via .NET CLI:
Bash
dotnet add package ByteHide.Monitordotnet add package ByteHide.MonitorStep 2: Configure in Global.asax
C#
using Bytehide.Monitor.Core.Actions;
using Bytehide.Monitor.Core.Protection;
protected void Application_Start()
{
// Standard ASP.NET setup
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
// Configure ByteHide Monitor
Task.Run(async () =>
{
await Bytehide.Monitor.Payload.ConfigureAsync(config =>
{
config.EnableAllProtections(ActionType.Close, intervalMs: 60000);
});
}).Wait();
}using Bytehide.Monitor.Core.Actions;
using Bytehide.Monitor.Core.Protection;
protected void Application_Start()
{
// Standard ASP.NET setup
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
// Configure ByteHide Monitor
Task.Run(async () =>
{
await Bytehide.Monitor.Payload.ConfigureAsync(config =>
{
config.EnableAllProtections(ActionType.Close, intervalMs: 60000);
});
}).Wait();
}Step 3: Run
Build and run your project. Monitor is now active and protecting your application.