ReCaptcha for MVC5

Description

ReCapthcha plugin for ASP.NET MVC 5. It support html rendering and verification of captcha.

http://www.google.com/recaptcha 

 

Features

1. Rendering in Razor and aspx.

2. Rendering extensions.

3. Controller extensions for verification.

4. async and Task based verification.

5. Full customization of reCAPTCHA ui.

6. Built using .NET 4.5

 

Simple Integration

// Rendering in Razor
 @Html.reCAPTCHA(your_public_key, ReCaptchaThemes.clean)

// Verification in Controller
[HttpPost]
[AllowAnonymous]
public async Task<ActionResult> ValidateCaptcha(ReCaptchaViewModel model)
{
    ReCaptchaResponse response = await this.verifyReCAPTCHA(model, your_private_key, true);

    if (response.Success)
    {
       // Verification success
    }
    else
    {
      // Verification failed. Log error code.

      var Reason = response.ErrorCode;
    }
}

Last edited Feb 11, 2014 at 10:48 AM by rajdeepp, version 4