Skip to main content

.NET Agent

Overview

BotManager .NET Agent is a macro detection and security solution that can be integrated into .NET-based web applications. It detects macro activity in page and API requests and can automatically respond by blocking or using Captcha, Redirect, etc.

.NET Agent Features

Supports .NET 4.0 and above, and can be used with both .NET Framework and .NET Core.

Key Features

FeatureDescription
Page Request DetectionDetects macro activity when users make page requests and responds accordingly
API Request DetectionAlso detects macro activity in REST API requests
Standalone UseWhen only .NET Agent is installed, it responds only to page requests (URL calls) via Location header
Browser Agent IntegrationWhen used with Browser Agent, provides additional Redirect response for asynchronous requests (XHR, Fetch)

Supported Environments

  • .NET 4.0 and above (.NET 4.x versions supported)
  • HTTP and HTTPS request support

How It Works

BotManager .NET Agent works in the following flow:

  1. Initialization: Initialize BotManager when the application starts.
  2. Request Detection: Call DetectPage() or DetectApi() when processing HTTP requests.
  3. Response Handling: Perform redirects via Location header or X-BotManager-Location header according to detection results.
Method Selection Guide
  • Page Requests: Use DetectPage() method
  • API Requests: Use DetectApi() method
  • Each method applies different detection logic.

Installation

BotManager .NET Agent is installed by adding a DLL file to the project.

For detailed installation instructions, see Installation and Initialization.

Configuration Options

BotManager .NET Agent provides various configuration options:

OptionTypeRequiredDescription
TenantIdstringUnique ID for customer identification
DomainNamestringDomain of the server receiving requests
ServerUrlstringDetection server URL (default provided)
ProtectionUrlstringBlock page URL (default provided)
HttpRequestTimeoutintHTTP request timeout (ms)
LogLevelstringLog level (ERROR, WARN, INFO, DEBUG)

For detailed configuration options, see Configuration Options Reference.

Required Settings

TenantId and DomainName must be configured. You can find them in the BotManager console.