public override void OnActionExecuting(ActionExecutingContext filterContext)
 {
     CaptchaValidator recaptchaValidator = new CaptchaValidator
     {
         ChallengeValue = filterContext.HttpContext.Request.Form["captcha_challenge_field"],
         ResponseValue = filterContext.HttpContext.Request.Form["captcha_response_field"],
         ClientKey = GetClientKey(filterContext)
     };
     if (recaptchaValidator.ShouldValidate())
     {
         bool valid = recaptchaValidator.Validate();
         if (!valid)
         {
             InvalidateClientKey(filterContext);
         }
         filterContext.ActionParameters["captchaValid"] = valid;
         base.OnActionExecuting(filterContext);
     }
 }
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            CaptchaValidator recaptchaValidator = new CaptchaValidator
            {
                ChallengeValue = filterContext.HttpContext.Request.Form["captcha_challenge_field"],
                ResponseValue  = filterContext.HttpContext.Request.Form["captcha_response_field"],
                ClientKey      = GetClientKey(filterContext)
            };

            if (recaptchaValidator.ShouldValidate())
            {
                bool valid = recaptchaValidator.Validate();
                if (!valid)
                {
                    InvalidateClientKey(filterContext);
                }
                filterContext.ActionParameters["captchaValid"] = valid;
                base.OnActionExecuting(filterContext);
            }
        }