Coder Social home page Coder Social logo

tanveery / recaptcha-net Goto Github PK

View Code? Open in Web Editor NEW
162.0 2.0 69.0 829 KB

reCAPTCHA for .NET library lets you easily use Google's reCAPTCHA in an ASP.NET Web Forms / MVC / ASP.NET Core application.

License: Apache License 2.0

C# 100.00%
recaptcha recaptchav2 recaptcha-api dotnet asp-net asp-net-core asp-net-mvc recaptcha-net recaptcha-control recaptcha-library

recaptcha-net's Introduction

reCAPTCHA library for .NET

reCAPTCHA for .NET is one of the most popular and well-documented reCAPTCHA libraries used by thousands of .NET developers in their ASP.NET web applications. The library is created and maintained by @tanveery.

Highlights

The following are the highlights of the library:

  • Renders reCAPTCHA widget and verifies reCAPTCHA response with minimal amount of code
  • Provides reCAPTCHA web control (ASP.NET Web Forms for .NET Framework 4.5 and above
  • Provides HTML helper to quickly render reCAPTCHA widget (ASP.NET MVC 5 / ASP.NET Core 3.1 and above)
  • Supprts reCAPTCHA version 2
  • One of the most well-documented reCAPTCHA libraries in the open source community

How to Use reCAPTCHA for .NET: Step-by-Step

Creating a reCAPTCHA API Key

Before you can use reCAPTCHA in your web application, you must first create a reCAPTCHA API key (a pair of site and secret keys). Creating reCAPTCHA API key is very straight-forward. The following are the steps:

  1. Go to the Google's reCAPTCHA site.
  2. Click on the Admin Console menu option. You will be required to login with your Google account.
  3. In the Admin Console page, click on the Create button.
  4. Enter a label for your web application.
  5. Select reCAPTCHA v2 option and then "I'm not a robot" Checkbox sub-option from the reCAPTCHA Type list.
  6. Enter the domain of your web application, e.g. example.com. If you are creating this key for your localhost, just enter localhost. You can enter more than one domain which is useful if you want the key to work across different hosts.
  7. Accept the reCAPTCHA terms of service.
  8. Click on the Submit button.
  9. Copy your Site Key and Secret Key which you would need to specify in your application's web.config file.

Installation

The best and the recommended way to install the latest version of reCAPTCHA for .NET is through Nuget. From the Nuget's Package Manager Console in your Visual Studio .NET IDE, simply execute the following command:

PM> Install-Package RecaptchaNet

You can also download a released build of reCAPTCHA for .NET by going to the Releases section of this project.

Set Configuration

ASP.NET Web Forms / ASP.NET MVC 5

In the appSettings section of your web.config file, add the following keys:

<appSettings>
<add key="RecaptchaSiteKey" value="Your site key" />
<add key="RecaptchaSecretKey" value="Your secret key" />
</appSettings>

ASP.NET Core

In appsettings.json, add the following JSON properties:

"RecaptchaSiteKey": "Your site key",
"RecaptchaSecretKey": "Your secret key"

In the ConfigureServices method of the Startup class, add the following line of code:

using Recaptcha.Web.Configuration;
...
RecaptchaConfigurationManager.SetConfiguration(Configuration);

Render reCAPTCHA Widget

You can either use the Recaptcha.Web.UI.Controls.RecaptchaWidget web control (ASP.NET Web Forms) or call the RecaptchaWidget method of HTML helper (ASP.NET MVC 5 / ASP.NET Core) to render reCAPTCHA widget:

ASP.NET Web Forms

<%@ Register Assembly="Recaptcha.Web" Namespace="Recaptcha.Web.UI.Controls" TagPrefix="cc1" %>
...
<cc1:RecaptchaWidget ID="Recaptcha1" runat="server" />

ASP.NET MVC 5 / ASP.NET Core

@using Recaptcha.Web.Mvc;
...
@Html.RecaptchaWidget()

The above code by default renders both the API script as well as the widget. There are times when you want to render the API script and the widget separately such as the need to render multiple widgets on a page. The following is an example of how to achieve this:

ASP.NET Web Forms

<%@ Register Assembly="Recaptcha.Web" Namespace="Recaptcha.Web.UI.Controls" TagPrefix="cc1" %>
...
<cc1:RecaptchaApiScript ID="RecaptchaApiScript1" runat="server" />
<cc1:RecaptchaWidget ID="RecaptchaWidget1" RenderApiScript="false" runat="server" />
<cc1:RecaptchaWidget ID="RecaptchaWidget2" RenderApiScript="false" runat="server" />

ASP.NET MVC 5 / ASP.NET Core

@using Recaptcha.Web.Mvc;
...
@Html.RecaptchaApiScript()
@Html.RecaptchaWidget(rednderApiScript:false)
@Html.RecaptchaWidget(rednderApiScript:false)

Verify reCAPTCHA Response

When your end-user submits the form that contains the reCAPTCHA widget, you can easily verify reCAPTCHA response with few lines of code:

ASP.NET Web Form

if (String.IsNullOrEmpty(Recaptcha1.Response))
{
    lblMessage.Text = "Captcha cannot be empty.";
}
else
{
    var result = Recaptcha1.Verify();
    if (result.Success)
    {
        Response.Redirect("Welcome.aspx");
    }
    else
    {
        lblMessage.Text = "Error(s): ";
        foreach(var err in result.ErrorCodes)
        {
            lblMessage.Text = lblMessage.Text + err;
        }
    }
}

ASP.NET MVC 5 / ASP.NET Core

using Recaptcha.Web.Mvc;
...
RecaptchaVerificationHelper recaptchaHelper = this.GetRecaptchaVerificationHelper();
if (String.IsNullOrEmpty(recaptchaHelper.Response))
{
    ModelState.AddModelError("", "Captcha answer cannot be empty.");
    return View(model);
}
RecaptchaVerificationResult recaptchaResult = recaptchaHelper.VerifyRecaptchaResponse();
if (recaptchaResult != RecaptchaVerificationResult.Success)
{
    ModelState.AddModelError("", "Incorrect captcha answer.");
}

Attributes

The attributes are used to control the behavior and appearance of the reCAPTCHA widget. They are specified in one of the three ways:

  • As API parameters (ASP.NET MVC and ASP.NET Core helper methods)
  • As properties of a web control (ASP.NET Web Control)
  • Configuration (web.config / appsettings.json)

Assigning a value through method or property takes precedence over configuration. Of course, you don't need to set any attribute anywhere unless its requried. The following is the entire list of the attributes:

Attribute Description Type Values Default Value Configuration Key Required
Site Key Site key for reCAPTCHA. It is required for rendering the widget. String The site key associated with the site you register in Google reCAPTCHA Admin Console. No default value. Must be provided. RecaptchaSiteKey Yes
Secret Key Secret key for the reCAPTCHA. It is required for verifying reCAPTCHA response. String The secret key associated with the site you register in Google reCAPTCHA Admin Console. No default value. Must be provided. RecaptchaSecretKey Yes
APIVersion Determines the version of the reCAPTCHA API. String - 2 RecaptchaApiVersion No
Language Forces the reCAPTCHA widget to render in a specific language. By default, the user's language is used. String One of the values from the Language Codes list. User's language RecaptchaLanguage No
Size The size of the reCAPTCHA widget. RecaptchaSize enum Default, Normal, Compact Default RecaptchaSize No
TabIndex The tabindex of the reCAPTCHA widget. Int32 Any integer 0 - No
Theme The ccolor theme of the reCAPTCHA widget. RecaptchaTheme enum Default, Light, Dark Default RecaptchaTheme No
Use SSL Determines if SSL is to be used in Google reCAPTCHA API calls. RecaptchaSslBehavior enum AlwaysUseSsl, SameAsRequestUrl, DoNotUseSsl AlwaysUseSsl RecaptchaUseSsl No

Samples

The repo comes with three working samples that you can use to quickly understand and test the library:

  • RecaptchaAspNetCoreSample (.NET Core 3.1 + ASP.NET Core)
  • RecaptchaMVCSample (.NET Framework 4.5 + ASP.NET MVC 5)
  • RecaptchaWebFormSample (.NET Framework 4.5 + ASP.NET Web Forms)

Note: Before running these samples, please ensure that the site key and secret key are set in the web.config (.NET Framework) or appsettings.json (.NET Core) file.

Tooling

The current version of the repo is created using Microsoft Visual Studio 2019 Community Edition with .NET Framework 4.5 and .NET Core 3.1 as compilation targets.

Issues

If you find a bug in the library or you have an idea about a new feature, please try to search in the existing list of issues. If the bug or idea is not listed and addressed there, please open a new issue.

recaptcha-net's People

Contributors

cmjdiff avatar edika99 avatar ggobbe avatar jorrit avatar magnusjohansson avatar naile avatar pstdylan avatar tanveery avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

recaptcha-net's Issues

reCaptcha - Asp.Net 3.1 - Site key cannot be null or empty

I have two websites, installed reCaptcba on one, created the keys in Google and followed the guidance, putting the keys in web.config and appsettings.json (probably not necessary). This works fine, I even found the keys that allow it to be tested on a local server. I then went to my second website and tried to do the same. This website had no web.config file so I created one and put the keys for the second website into it. However, when I tested the site on the local server it came up with the error 'InvalidOperationException: Site key cannot be null or empty.' when it hits the line @Html.RecaptchaWidget(). I then published the website and the same error occurred. I suspect that web.config is not be accessed, although it is there in both my local View folder and on the remote server. Assuming that this is where the problem lies, how do I get the key read?

recaptcha is not shown, after validation error

Hello, I have integrated the reCaptcha into an ASP.NET MVC form for registering new users. When the web form ist opened for the first time, the reCaphta is shown and if the form is filled with correct parameters, the registration can be finished successfully. If a user set in some wrong parameters in the form, the server side validation detects an error and the registration form is shown once more, but without the reCaptcha. How can I force the reCaptcha to be schown again after a validation error?
Now the reCaptcha is only be shown once more, if a user hits the browser reload button or F5.

Newtonsoft.Json 7.0.0.0 is not defined as requirement for NuGet package

When I try to parse correct response with return reCaptcha.Verify(); I receive following exception:
9200 11:07:59 ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.IO.FileLoadException
Message: Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source: Recaptcha.Web
at Recaptcha.Web.RecaptchaVerificationHelper.VerifyRecpatcha2Response(String privateKey)
at ....get_CaptchaValidation() in ...\Captcha.ascx.cs:line 30
at ...CvCaptchaRequiredValidate(Object source, ServerValidateEventArgs args) in ...\Captcha.ascx.cs:line 54
at System.Web.UI.WebControls.CustomValidator.OnServerValidate(String value)
at System.Web.UI.WebControls.BaseValidator.Validate()
at System.Web.UI.Page.Validate(String validationGroup)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

This does not happen if I have empty response (captcha is not clicked) - error is not shown.

My project references Newtonsoft.Json 6.0.0.0, in references of reCaptcha I see that there is 7.0.0.0 version used.

Documentation errors

There are errors in the documentation, the biggest of which is in the description of the security key configuration, where the "key" attribute is mistakenly labeled "name'.

UseSsl Ignored.

I am loading the Recaptcha (vr 1.7.0) into an MVC view using the following:

@Html.Recaptcha(, Recaptcha.Web.RecaptchaTheme.Clean, Nothing, 0, True)

It seems the library is checking Request.IsSecureConnection() to determine whether or not the path should use SSL and overriding the UseSsl property set in the constructor. As I am behind a load balancer that is using SSL offloading, it would always return false if Request.IsSecureConnection() is called.

Can the value set in the constructor always take priority over what Request.IsSecureConnection() returns?

Thanks for a great tool!

NullReference Exception

Hi i create ActonFilterAttribute and i have problem with null reference exception in recaptchaHelper.VerifyRecaptchaResponse().

This problem is only for version 2.

public class IsValidCaptcha : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
var controller = (filterContext.Controller as Controller);
if (controller == null)
return;

        var ms = filterContext.Controller.ViewData.ModelState;

        var recaptchaHelper = controller.GetRecaptchaVerificationHelper();
        if (String.IsNullOrEmpty(recaptchaHelper.Response))
        {
            ms.AddModelError("", "Captcha answer cannot be empty.");
        }
        var recaptchaResult = recaptchaHelper.VerifyRecaptchaResponse();
        if (recaptchaResult != RecaptchaVerificationResult.Success)
        {
            ms.AddModelError("", "Incorrect captcha answer.");
        }
    }
}

at Recaptcha.Web.RecaptchaVerificationHelper.VerifyRecpatcha2Response(String privateKey)
at SteamMarket.Logic.Common.Filters.IsValidCaptcha.OnActionExecuting(ActionExecutingContext filterContext) in G:___ORIK\SteamMarket\SteamMarket\SteamMarket.Logic\Common\Filters\IsValidCaptcha.cs:line 23
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)

Checking response gives error, checking no response works

The docs give 2 options for checking the user's response.
Option 1:
RecaptchaVerificationResult recaptchaResult = await recaptchaHelper.VerifyRecaptchaResponse();

Option 2:
RecaptchaVerificationResult recaptchaResult = await recaptchaHelper.VerifyRecaptchaResponseTaskAsync();

Both options give code suggestion errors.

The errors for Option 1:
"The await operator can only be used within an async method. Consider marking this method with the async modifier and changing its return type to 'Task'
'RecptchaVerificationResult' does no contain a definition for 'GetAwaiter' and no extension method 'GetAwaiter' accepting a first argument of type 'RecaptchaVerificationResult' could be found (are you missing a using directive or an assembly reference?)'"

The errors for Option 2:
"The await operator can only be used within an async method. Consider marking this method with the async modifier and changing its return type to 'Task'

Using the code suggestion changing
"public ActionResult Creat ....." to
"public async System.Threading.Tasks.Task Creat ......"
allows Option 2 to compile, but it does not work.

If neither Option 1 or 2 are used, i.e. only the check for any response at all is made, then this works.

Thanks.

Support of reCAPTCHA API v2

You maybe know, I've made a fork of the project and have implemented support of the latest version of the reCAPTCHA API (including the new widget support) with keeping of full backward compatibility with the Recaptcha for .NET assemblies. Source code is also mirrored on GitHub at https://github.com/evnik/reCAPTCHA4net.
I believe my changes could be ported back to the Recaptcha for .NET project. Let me know if you interested in, and I will create a pull request.

[Feature request] Support for Razor Pages and Blazor

I'm moving my project from MVC5 to Asp.Net Core using Razor Pages and found that only MVC is supported. It woud be great to have some kind of RecaptchaRazorPageExtensions.cs and also the one for Blazor.

Thanks.

"Recaptcha.Web" built against ".NETFramework,Version=v4.5" framework

I have a complex project using .NETFramework,Version=v4.0 which I cannot migrate to .NET 4.5 because that requires VS 2012 or higher which I do not have, I only have VS 2010.

I just want to upgrade my ASP project to reCaptchaV2
I get this error:

The primary reference "Recaptcha.Web" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".

What can I do to resolve this issue?
Is there a version of Recaptcha.Web targeted at 4.0 or lower that I can use, please!

This is not wokring with recent Google Changes

I am keep getting below error. This needs to be fixed. If Developer cannot keep this updated with Google changes and also no support for version 3 then I would suggest to take down or turn off this repository.
google_captcha_issues

Client/Server Events on WebForm ASP.Net

Hi,
first of all I want to thank you for this perfect library, it solved a problem for me.
I have a question:
I'm using it on "old" WebForms ASP.Net application and I'd like to enable the "Login"button only if reCAPTHCA is checked and validated, but I did not find any Client or Server event to attach to.
Is there a way to achieve this?
Yhanks

Recaptcha.Web.dll crashes - cannot find file assembly

Recaptcha.Web.dll has been working beautifully for quite a while. Recently, it started crashing with this error:
Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.

After some investigation, I thought it is happening because my Windows installation has upgraded Newtonsoft.Json. So I thought I would rebuild Recaptcha.Web.dll using the upgraded Newtonsoft.Json, and the online source.

Now, I am getting this error:
Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.

Help is most appreciated.

Ori

reCaptcha lib v2.1 shows old style captcha

I am using Recaptcha.Web.dll v2.1.0.0 but, when run, shows the older version, i.e., 2 words instead of the newer "I am not a robot" with checkbox.
Any ideas why?
Help most appreciated.

Ori

Support for using RecaptchaVerificationHelper from ActionFilter

Hello, thanks for great lib!
I would like to use it in my project, but suddenly found that RecaptchaVerificationHelper is available only in controller.
It seems to me captcha verification is cross-cutting concern and can be implemented as ActionFilter, and it can improve your library, can you add support for this funcrionality? Or i can help you and create a pull request.

Support/Build for .NET 4.7.2

Hi,

when using newer .NET versions this warning comes up (as expected if 4.5 is the latest target)

Warning CS1702 Assuming assembly reference 'System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' used by 'Recaptcha.Web' matches identity 'System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' of 'System.Web.Mvc', you may need to supply runtime policy

Is there any chance the library will be rebuilt to support/target newer .NET versions as well? Anything we can do to help?

Thank you,

Martin

Request.Params fires input validation

I have a contact form that uses [AllowHtml] on the Body property to allow users to submit HTML code to me, which was working fine, but after installing recaptcha-net the old "A potentially dangerous Request.Form value was detected from the client" exceptions came back

It looks like this is bot-related activity that isn't passing the recaptcha validation parameters, which leads to a code path that makes use of Request.Params, which unconditionally validates input (ie [AllowHtml] and ValidateInput(false) are not taken into account)

To fix this problem I've switched from Request.Params to Request.Unvalidated, and now the exceptions have stopped again.

So what are your thoughts on switching to Request.Unvalidated in the main codebase? Unfortunately Request.Unvalidated is not available in 4.0, which wasn't a problem in my case because I wanted to build 4.5.1 DLLs anyway, but the main codebase would need to work around that somehow (e.g. maybe use an #if NET40 to keep the old Request.Params behaviour for 4.0)

Thanks,
Rick

Using in a Modal Login form does not pass the token

Hi there,

can you add a comment on how to use this in a pop-up Model like a login form, when I try it in the login form, I am not getting the token for validation, but it works on a regular page.

how can I get the token on the backend in a login modal form

thanks

Code analysis warning with RecaptchaNet.1.7.0

Hi,

I am using RecaptchaNet.1.7.0 with MVC 5.2.3.But when I build the application the getting code analysis warning.

"CA0001 Error Running Code Analysis CA0001 : The following error was encountered while reading module 'Project.Demo.App': Assembly reference cannot be resolved: System.Web.Mvc, Version=5.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35."

Can you please suggest to resolve this issue ?

Thanks in advance.

System.InvalidOperationException: Reponse is emptry.

RecaptchaVerificationHelper.txt

I receive the exception if the recaptcha is not filled at all.
I'm using v2 recaptcha.
The excpetion is thrown on

RecaptchaVerificationResult result = recaptcha1.Verify();
at line 104 of RecaptchaVerificationHelper you have to handle the empty response not throwing an exception an retiurning a failed verification.

if (string.IsNullOrEmpty(Response)) { throw new InvalidOperationException("Reponse is emptry."); }
Not filling the recaptcha is equivalent to a failed verification not to an exception.

Attached a working version of RecaptchaVerificationHelper.cs

Multiple reCAPTCHAs on same page only renders the first control

Hello. I have used reCAPTCHA for .NET on several of my sites. I am currently working with a legacy site that has two html forms on the same page. While recaptcha for .net is working on other pages, it only renders and works for the first form on the page with two forms. After some googling it looks as if this is something supported by the API. See http://mycodde.blogspot.com/2014/12/multiple-recaptcha-demo-same-page.html. Is this something you could fold into your reCAPTCHA for .NET? Thanks!

CS0426 - The type name 'Web' in the type 'Recaptcha.Web.UI.Controls.Recaptcha' is not available.

Hi there,

thank you for this great control. It saved some time to me and makes the implementation clean and simple. However, when I try to use any binding expression on your control I get the compiler error on runtime: CS0426 - The type name 'Web' in the type 'Recaptcha.Web.UI.Controls.Recaptcha' is not available.

Example:

<uc:Recaptcha ID="captcha" runat="server" Theme="Blackglass" Language='<%# this.DisplayLanguage %>' />

This also happens when I want to bind the public or private key on your control, however, since you allow to set those keys in the web.config, it's not a problem.

Whatsoever, I could bypass the problem by setting the language in code behind in my Page_Init event:

this.captcha.Language = this.DisplayLanguage;

However, it's still a bug, so here I report it.

Thanks for keeping this awesome control up2date.

How to fix mix content error on a https website ?

Hi,
Today when I deploy my website to apphb (https://softnews.apphb.com). I got an error saying that the site uses http content (mix content) due to a references to google recaptcha. By default, we use SslBehavior useSsl = SslBehavior.SameAsRequestUrl already. Do you have any idea to fix it ?
Thanks for your nice package!

Recaptcha & proxy configuration

With some extended testing on our different environments I came to the following conclusion regarding the usage of a proxy and this library.
It seems to me, by using WebRequest.GetSystemWebProxy() in VerifyRecaptchaResponse of RecaptchaVerificationHelper, the proxy that is used is always the proxy defined in settings of IE for current user (in our case NetworkService, defined on application pool).
Overriding this proxy with web.config fails because the result of method above always overrides the default proxy.
Currently I'm keeping my proxy on the NetworkService account but it would be more usefull if this is adaptable by config.

v2 Does not show verify Images Pop-out on Browser first load

I've tried this on Chrome, IE, Firefox, Kindle, Windows phone and notice that when the widget first loads and I click "I'm not a Robot" - the widget displays a tick without showing the verify images pop-out. I have to close and re-open the Browser I'm using to make the widget work correctly.
I'm using the latest version of recaptchanet in a webforms .net app over an ssl connection (not localhost).

Any ideas?

Reinit reCaptcha after successful postback

Struggling with following problem:
I have a form on a page, which checks Captcha and allows several subsequent submissions (submit a form, then press a button - submit once again with new data). On first postback, Captcha is checked correctly, but, on subsequent submissions it is not shown.
Can you suggest how to reinit reCaptcha control in WebForms?

Upgrade from 2.0.0 to 2.1.0

When I did an upgrade from 2.0.0 to 2.1.0, it appended the "recaptchaPublicKey" "recaptchaPrivateKey" and "recaptchaApiVersion" keys to web.config. It will show an error regarding recaptchaPublicKey being empty: "Exception Details: System.InvalidOperationException: Public key cannot be null or empty." Although this is an accurate error, it may not be obvious at first to delete the duplicate keys near the end of </appSettings>.

Typo

image

Must be "render"

Add Callback option to Html.Recaptcha()

It would be nice if there was a way to set the callback method using the Html.Recaptcha() method. It would then set the data-callback attribute on the tag. Setting this via a web.config would be nice too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.