Mar 09, 2015 It uses the automatic way of rendering Google reCaptcha on the ASP.net page. Download the attached DLL file i.e. 'GoogleReCaptcha.dll' and reference it to any ASP.net project. Then, add reference to this ReCaptcha control on ASP.net page where you want to display Captcha control. Using Google reCAPTCHA version 2.0 using classic asp Google reCAPTCHA version 2 is totally different than the first version. Here's some code that allows you to use the new 'I'm not a robot' version of recaptcha using classic asp. I need help to implement the answer Google Recaptcha 2.0. I've tried a few ways to recover the response after sending the form but not consigui get the answer True. Follows the example I'm trying. Sample Form with ReCAPTCHA. First Name; Last Name; Email; Pick your favorite color: Red Green Green. There is an answer on Stack Overflow about that which seems possible to use it with code Newtonsoft.Json/code. I also find those articles which might help:. How to Validate Recaptcha V2 Server side. Using reCAPTCHA with ASP.NET. Google ReCa.
Welcome to the reCAPTCHA developer documentation.
reCAPTCHA protects you against spam and other types of automated abuse. Here, we explain how to addreCAPTCHA to your site or application.
Audience
This documentation is designed for people familiar with HTML forms, server-side processing or mobileapplication development. To install reCAPTCHA, you will probably need to edit some code.
We hope you find this documentation easy to follow. Make sure to join the reCAPTCHA developerforum to give feedback and discuss the API.
You can find a reCAPTCHA codelab here.
Overview
To start using reCAPTCHA, you need to sign up for an API keypair for your site. The key pair consists of a site key andsecret key. The site key is used to invoke reCAPTCHA service on your site or mobile application. Thesecret key authorizes communication between your application backend and the reCAPTCHA server toverify the user's response. The secret key needs to be kept safe forsecurity purposes.
First, choose the type of reCAPTCHA and then fill in authorized domainsor packagenames. After youaccept our terms of service, you can click Register button to get new API key pair.
Now please take the following steps to add reCAPTCHA to your site or mobile application:
- Choose the client side integration:
- reCAPTCHA v2
Google reCAPTCHA v2/v3 for ASP.NET Core 2
See the version list below for details.
reCAPTCHA.AspNetCore
Google reCAPTCHA v2/v3 for ASP.NET Core 2
Install
From the a command prompt
You can also search for package via your nuget ui / website:
https://www.nuget.org/packages/reCAPTCHA.AspNetCore/
Requirements
You must first have a secret key and a site key in order to use the reCAPTCHA service. This package supports v2 and v3 api keys. You can read more about reCAPTCHA v2, and v3 as well as sign up for free here: https://www.google.com/recaptcha/intro/
Configure
Choose how you want to configure the storage of your RecaptchaSettings. This contains your site key, and site secret so it's recommended to use secrets.json with Azure Key Vault (or similar setup). However you can also just add the section to your appconfig.json file.
appconfig.json
Add the follow entry to the file make sure to paste in your secret key and site key followed by setting the correct version to v2 or v3 depending on your key type:
secrets.json
Right click on your project file and goto Manage Secrets.
This will open secrets.json. Add the follow entry to the file make sure to paste in your secret key and site key followed by setting the correct version to v2 or v3 depending on your key type:
Note: This will also require you to have a setup such as Azure Key Vault (or similar setup) when running in production.
Examples
Open Startup.cs and add the following code as shown below to your ConfigureServices method:
Usage
In order to prevent having to copy and paste your site key all over your view files (a nightmare to update later). You can inject your settings from the Startup method by adding the following code to top of your view file:
You can then freely include the Recaptcha script inside of forms you wish to vaidate later in your controller (supports multiple forms).
You may find that you need to add a reference to Microsoft.Extensions.Options before you can use IOptions.
You can see a tested example of usage in the Contact.cshtml view. However you will need to configure it with your key information before running yourself. You should also take note of the allowed domains security policy in the Google Recaptcha docs.
Validation
In order to validate a recaptcha script being used in a form you will first need to inject the IRecaptchaService class into your controller using the code below:
Finally you can validate the recaptcha attempts using the Validate method in the Recaptcha service in your HttpPost method:
You can see a tested example of usage in the HomeController.cs controller. However you will need to configure it with your key information before running yourself. You should also take note of the allowed domains security policy in the Google Recaptcha docs.
reCAPTCHA.AspNetCore
Google reCAPTCHA v2/v3 for ASP.NET Core 2
Install
From the a command prompt
You can also search for package via your nuget ui / website:
https://www.nuget.org/packages/reCAPTCHA.AspNetCore/
Requirements
You must first have a secret key and a site key in order to use the reCAPTCHA service. This package supports v2 and v3 api keys. You can read more about reCAPTCHA v2, and v3 as well as sign up for free here: https://www.google.com/recaptcha/intro/
Configure
Choose how you want to configure the storage of your RecaptchaSettings. This contains your site key, and site secret so it's recommended to use secrets.json with Azure Key Vault (or similar setup). However you can also just add the section to your appconfig.json file.
appconfig.json
Add the follow entry to the file make sure to paste in your secret key and site key followed by setting the correct version to v2 or v3 depending on your key type:
secrets.json
Right click on your project file and goto Manage Secrets.
This will open secrets.json. Add the follow entry to the file make sure to paste in your secret key and site key followed by setting the correct version to v2 or v3 depending on your key type:
Note: This will also require you to have a setup such as Azure Key Vault (or similar setup) when running in production.
Examples
Open Startup.cs and add the following code as shown below to your ConfigureServices method:
Usage
In order to prevent having to copy and paste your site key all over your view files (a nightmare to update later). You can inject your settings from the Startup method by adding the following code to top of your view file:
You can then freely include the Recaptcha script inside of forms you wish to vaidate later in your controller (supports multiple forms).
You may find that you need to add a reference to Microsoft.Extensions.Options before you can use IOptions.
You can see a tested example of usage in the Contact.cshtml view. However you will need to configure it with your key information before running yourself. You should also take note of the allowed domains security policy in the Google Recaptcha docs.
Validation
In order to validate a recaptcha script being used in a form you will first need to inject the IRecaptchaService class into your controller using the code below:
Finally you can validate the recaptcha attempts using the Validate method in the Recaptcha service in your HttpPost method:
You can see a tested example of usage in the HomeController.cs controller. However you will need to configure it with your key information before running yourself. You should also take note of the allowed domains security policy in the Google Recaptcha docs.
Show moreRelease Notes
Dependencies
Classic Asp Recaptcha 2.0 Crack
.NETCoreApp 2.0
- Microsoft.AspNetCore.Mvc.ViewFeatures(>= 2.0.0)
- Microsoft.NETCore.App(>= 2.0.0)
Used By
NuGet packages
Classic Asp Recaptcha 2.0 User
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on reCAPTCHA.AspNetCore:
Repository | Stars |
---|---|
poppastring/dasblog-core |
Version History
Version | Downloads | Last updated |
---|---|---|
3.0.10 | 7,589 | 8/26/2020 |
3.0.9 | 120 | 8/25/2020 |
3.0.8 | 350 | 8/22/2020 |
3.0.7 | 1,558 | 8/12/2020 |
3.0.6 | 4,691 | 7/10/2020 |
3.0.5 | 1,462 | 6/25/2020 |
3.0.4 | 159 | 6/24/2020 |
3.0.3 | 6,652 | 5/8/2020 |
3.0.2 | 1,344 | 5/4/2020 |
3.0.1 | 162 | 5/4/2020 |
3.0.0 | 217 | 5/3/2020 |
2.2.5 | 2,077 | 5/2/2020 |
2.2.3 | 88,839 | 4/15/2019 |
2.2.2 | 2,080 | 4/11/2019 |
2.2.1 | 345 | 4/9/2019 |
2.2.0 | 963 | 4/8/2019 |
2.1.3 | 23,935 | 1/12/2019 |
2.1.2 | 593 | 1/4/2019 |
2.1.1 | 1,503 | 11/24/2018 |
2.1.0 | 1,015 | 10/13/2018 |
2.0.0 | 505 | 9/20/2018 |
1.0.1 | 2,596 | 11/5/2017 |
1.0.0 | 393 | 11/1/2017 |