Quick Start - Monitor for .NET
Get ByteHide Monitor protecting your .NET application in under 5 minutes.
Prerequisites
- .NET 6.0+ (or .NET Framework 4.6.2+)
- A ByteHide account with a Monitor project (create one here)
- Your ByteHide Project Token from cloud.bytehide.com
Step 1: Install the NuGet Package
Bash
dotnet add package ByteHide.Monitordotnet add package ByteHide.MonitorOr via the NuGet Package Manager in Visual Studio:
CODE
Install-Package ByteHide.MonitorInstall-Package ByteHide.MonitorStep 2: Configure Monitor
For Standalone Applications (Console, Desktop, Mobile, IoT)
C#
using Bytehide.Monitor.Core.Actions;
using Bytehide.Monitor.Core.Protection;
await Bytehide.Monitor.Payload.ConfigureAsync(config =>
{
config.EnableAllProtections(ActionType.Close, intervalMs: 60000);
});using Bytehide.Monitor.Core.Actions;
using Bytehide.Monitor.Core.Protection;
await Bytehide.Monitor.Payload.ConfigureAsync(config =>
{
config.EnableAllProtections(ActionType.Close, intervalMs: 60000);
});For ASP.NET Core Applications
C#
// Program.cs
builder.Services.AddByteHideMonitor(monitor => monitor
.WithProtection(ProtectionModuleType.SqlInjection, ActionType.Block)
.WithProtection(ProtectionModuleType.CrossSiteScripting, ActionType.Block)
);
app.UseByteHideMonitor();// Program.cs
builder.Services.AddByteHideMonitor(monitor => monitor
.WithProtection(ProtectionModuleType.SqlInjection, ActionType.Block)
.WithProtection(ProtectionModuleType.CrossSiteScripting, ActionType.Block)
);
app.UseByteHideMonitor();Step 3: Run Your Application
Build and run. Monitor is now active and protecting your application at runtime.
Bash
dotnet rundotnet runOffline-First Architecture
Monitor operates locally without requiring a backend connection. All detection and interception happens within your application. The backend is only used for incident reporting and analytics.
Choose Your Application Type
For detailed installation guides tailored to your application type:
- ASP.NET Core: Web applications with middleware
- ASP.NET Framework: Legacy web applications
- Desktop Apps: Console, WPF, WinForms
- Mobile Apps: MAUI, Xamarin
- CI/CD & Docker: Automated builds and containers