.Net
TrustCaptcha – Bot protection

.Net CAPTCHA Integration

Add TrustCaptcha to ASP.NET forms and APIs in minutes: use the widget in your frontend and verify the token with our .NET package. Protect sign-ups, logins, contact forms and checkout flows from bots—without puzzles. EU-hosted and GDPR-ready.

Quickstart

How the integration works

1. Create a CAPTCHA

Create a user account or log in with an existing one. Then create a new CAPTCHA or select an existing one. If you’re unsure whether TrustCaptcha is right for you, try our CAPTCHA service risk-free for 14 days at no cost.

On the CAPTCHA overview page, you will find all the important information, such as the site key, secret key and licence key. Allow your websites to access your CAPTCHA by simply adding them to the access authorised domain list in the CAPTCHA security rules.

Start of the CAPTCHA creation form.
CAPTCHA security rules of a demo CAPTCHA.

2. Integrate the CAPTCHA widget into your frontend

Integrate the CAPTCHA widget into your website or app. For precise, detailed instructions, please read the CAPTCHA widget guide in our documentation.

Read the documentation

The CAPTCHA widget will then be displayed on your website or app:

CAPTCHA done

Prebuild frontend integrations
You can use one of our pre-built frontend integrations to integrate the CAPTCHA widget into your website or application. If there is no pre-built integration from us for your preferred frontend technology, your software developers can integrate the CAPTCHA themselves using using our documentation or ask our support-team for a pre-built integration solution.

Android
Angular
Craft CMS
Flutter
iOS
JavaScript
Joomla
Keycloak
Magento 2
React
React Native
TYPO3
Vue
Webflow
WordPress

3. Validate the CAPTCHA result in your backend

The following steps give you an idea of how to retrieve the CAPTCHA verification result from our server in a .Net backend and determine how to proceed based on this result. For precise, detailed instructions, please read the CAPTCHA integration guide for .Net in our documentation.

Read the documentation

First, install our TrustCaptcha .Net dependency:

Install
bash
dotnet add package TrustComponent.TrustCaptcha --version 2.0.0

Retrieve the verification result from our server using the verification token and the secret key of your CAPTCHA:

Fetch Result
C#
// Retrieving the verification result
VerificationResult verificationResult;
try
{
  verificationResult = await CaptchaManager.GetVerificationResult("<your_secret_key>", "<verification_token_from_your_client>");
}
catch (Exception ex)
{
  // Fetch verification result failed - handle error
}

Based on the verification results and your individual needs, decide how you would like to proceed:

Handle Result
C#
// Act on the verification result
if (!verificationResult.VerificationPassed || verificationResult.Score > 0.5)
{
  Console.WriteLine("Verification failed or bot score > 0.5 – possible automated request.");
}

Need detailed information about the .Net CAPTCHA integration?
For detailed instructions on integrating TrustCaptcha, please refer to our .Net CAPTCHA integration guide. A complete integration example for the .Net CAPTCHA can be found in our CAPTCHA Samples Repository on Github.

Other backend technology instead of .Net?
If you do not want to use .Net on your server or have several different backends, you can select a different integration here. If there is no pre-built integration from us for your preferred backend technology, your software developers can integrate the CAPTCHA verification process themselves using our documentation or ask our support-team for a pre-built integration.

.Net
Go
Groovy
Java
Kotlin
Nodejs
PHP
Python
Ruby
Rust
Scala
Spring

4. Congratulations 🎉

You are now protected by TrustCaptcha - congratulations!

CAPTCHA done

FAQs

What is a .NET CAPTCHA?
A .NET CAPTCHA is a security challenge you embed into ASP.NET or .NET Core forms and APIs to confirm that the visitor is human before your server processes the request. Unlike classic image puzzles, TrustCaptcha’s .NET integration runs automatically in the browser, then sends a signed token that you validate with just a few lines of C# code. Behind that simple flow, it layers dynamic proof-of-work, an AI-driven bot-score and customizable security policies to block advanced bots.
What is the best .NET CAPTCHA?
The best .NET CAPTCHA balances rock-solid bot defence with a friction-free user experience and full legal compliance. Pure proof-of-work services like CaptchaFox or FriendlyCaptcha slow attackers but cannot actively detect sophisticated headless bots, so their protection is limited. TrustCaptcha outperforms those options thanks to its multi-layered security stack and AI-driven bot score while remaining fully EU-hosted and GDPR-ready. Deep theming and white-label options further let you match your brand without extra CSS.
How does a .NET CAPTCHA work?
When the TrustCaptcha script loads, it starts a lightweight proof-of-work in the browser and collects anonymised behavioural signals. These signals are hashed into a signed token that your .NET backend verifies against the bot-score API, so no personal data ever leaves the EU. Developers simply read the token and call TrustCaptcha’s verification endpoint or .NET SDK, receiving a boolean and score within milliseconds.
Do I need a .NET CAPTCHA?
If your site exposes public forms, logins, search boxes or APIs, bots will eventually exploit them for spam, credential-stuffing or scraping. The 2025 threat landscape includes AI-driven headless browsers that bypass legacy image puzzles in seconds, so rate-limiting alone is no longer enough. Adding a multi-layered solution like TrustCaptcha stops both commodity and sophisticated attacks while staying invisible to genuine users.
Is TrustCaptcha GDPR-compliant and EU-hosted?
Yes—TrustCaptcha processes all CAPTCHA data exclusively in EU-based, ISO 27001-certified data centres and provides a standard Data Processing Agreement for every customer. It stores no cookies, encrypts all traffic and even offers an optional Minimal Data Mode for privacy-critical projects. That means you can deploy it without international data transfers or extra consent banners.
Can I customise the look and feel of TrustCaptcha?
TrustCaptcha supports more than 35 languages, light, dark or auto themes, full colour overrides and an invisible mode. You can also hide the branding, supply your own privacy-policy link and fine-tune size, border radius and autostart behaviour. These options help you maintain brand consistency and meet accessibility guidelines while still deterring bots.
Does TrustCaptcha impact performance or accessibility?
The TrustCaptcha script is up to three times lighter than image-heavy CAPTCHAs, improving load-time metrics and Core Web Vitals. Because it solves itself automatically and complies with WCAG 2.2, users with screen readers or motor impairments never face puzzle grids or timeouts. Client-side proof-of-work runs in the background and has negligible CPU impact on modern devices, providing strong security without hurting performance. That lean footprint aligns with Google’s Helpful Content guidance, which prioritises speed and accessibility when ranking support pages.
Losing leads to CAPTCHAs?

TrustCaptcha blocks spam and bots, not customers. No puzzles, GDPR-ready, EU-hosted.

CAPTCHA start
CAPTCHA done
Puzzle-free UX
Runs in the background while visitors type — so more people finish your forms and fewer drop off.
GDPR-ready
EU-hosted and privacy-first: no cookies, encrypted transmission, automatic cleanup — with ready-to-use legal resources.
Multi-layer Security
Adaptive protection plus intelligent risk scoring stops abuse early — even when attack traffic spikes.
Full Control
Fine-tune sensitivity, set allow/block lists, and use geoblocking — you decide how strict verification should be.

Protect your .Net application with TrustCaptcha in just a few steps!

  • EU-hosted & GDPR-ready
  • No puzzles
  • Try free for 14 days