reCaptcha is throwing exception

joyanta sen asked on December 27, 2018 01:05

Hi, I have implemented reCaptcha V2 in the form by using the following

tag

<div class="g-recaptcha" data-callback="verifyCaptcha" data-sitekey="####" data-type="audio">;</div> and registering the Captcha API using <script src="https://www.google.com/recaptcha/api.js" async="async" defer="defer"></script> in the header section. I am not using Kentico out-of-box reCapcga control. But while I am submitting the form, not sure why it is hitting the GetCaptachaValue() method inside TextCaptcha.ascx.cs file. And since there is no null check of textBoxList it is throwing error. Could anyone please let me know why it is hitting that function?

Thanks, Joy

Correct Answer

joyanta sen answered on December 27, 2018 20:08

Hi, Sorry for late posting..I found the issue.. There was a field with control type Security was in the page and that's the reason it was hitting that page.

Thanks.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Eric Dugre answered on December 27, 2018 19:56

Joyanta,

Is it possible that a Kentico Captcha control is located elsewhere on this page? Have you tried testing the form on another page, e.g. a blank page that doesn't nest within the master page?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.