Recaptcha Uncaught SecurityError: Blocked frame with source "https://www.google.com"

I am using recaptcha 2nd version. After submitting form date with ajax to server, I get

"Uncaught SecurityError: Blocked frame with source" https://www.google.com "from accessing frame with source" http: // localhost: 14656 ". The request for accessing the frame has protocol" https " address has protocol "http". Protocols must match ". mistake.

Added script as src = '//www.google.com/recaptcha/api.js' async defer in layout

I am using ASP MVC 4.0 for a project.

could you help me?

+1


source to share


2 answers


In your layout script change src to http://www.google.com/recaptcha/api.js



The error comes from your src running on https and your web app on http.

+3


source


Try the following:

<script src='https://www.google.com/recaptcha/api.js'></script>

      



and use:

<div class="g-recaptcha" data-sitekey="YOUR SITE KEY"></div>

      

-2


source







All Articles