Recaptcha Uncaught SecurityError:阻止了来源为"https://www.google.com"的框架 [英] Recaptcha Uncaught SecurityError: Blocked a frame with origin "https://www.google.com"

查看:56
本文介绍了Recaptcha Uncaught SecurityError:阻止了来源为"https://www.google.com"的框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Recaptcha 2nd版本.将带有Ajax的表单日期发布到服务器后,我得到了

I am using recaptcha 2nd version.After posting form date with ajax to server i am getting

未捕获的SecurityError:阻止了来源为" https://www.google.com 的框架"源为" http://localhost:14656 的框架.请求访问的框架的协议为"https",即正在访问的帧的协议为"http".协议必须匹配."错误.

"Uncaught SecurityError: Blocked a frame with origin "https://www.google.com" from accessing a frame with origin "http://localhost:14656". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match." error.

在布局中添加脚本为src ='//www.google.com/recaptcha/api.js'异步延迟

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

我正在将ASP MVC 4.0用于项目.

I am using ASP MVC 4.0 for project.

你能帮我吗?

推荐答案

在布局脚本中,将src更改为

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

发生此错误是因为您的src在https上运行,而您的Web应用程序在http上运行.

The error occurs because your src is running on https and your web app on http.

这篇关于Recaptcha Uncaught SecurityError:阻止了来源为"https://www.google.com"的框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆