recaptcha not showing in production website

1,080 views
Skip to first unread message

SalmOn SAL

unread,
Oct 12, 2016, 11:41:35 AM10/12/16
to reCAPTCHA
The recaptcha is not showing in web application developed in c# dotnet framework.
The recaptcha was working in test application, but not showing during production.
I registered the domain name to get the new keys for the recaptcha ,
But even after configuring the recaptcha with new keys, it's not showing in the website.
Note : Google recaptcha API is added inside head tag.
Note: while I registered the domain name I used my Google mail ID, and when I tried to access the page from my mobile which is linked to the same Gmail ID ,the recaptcha works fine, Is der any relation with mail ID ?
Is der anything to change in web.Config file ??
Kindly suggest me a solution
thanks in advance

Seth Munroe

unread,
Oct 12, 2016, 5:35:43 PM10/12/16
to reCAPTCHA
Have you tried different browsers? Also does the demo work for you?


Make sure that the production site is not trying to force IE Compatibility Mode with x-ua-compatible http headers or meta tags.

Also make sure your browser doesn't have your prod site/domain in it's compatibility mode settings.

-Seth

SalmOn SAL

unread,
Oct 13, 2016, 12:27:42 AM10/13/16
to reCAPTCHA
I tried with different browser... But it's not working...
Is there any issue with recaptcha if the website is HTTPS://

Seth Munroe

unread,
Oct 13, 2016, 9:31:53 AM10/13/16
to reCAPTCHA
There shouldn't be an issue with https, that's all my site allows. But there could be an issue if your call to bring in recaptcha isn't also using https.

Some browsers won't bring in http resources for a page that is https.

I use this, but I'm using explicit rendering, so your api call probably looks a little different.
<script src="https://www.google.com/recaptcha/api.js?onload=recaptchaLoad&render=explicit" type="text/javascript" async defer></script>

Another thing you can do is just not specify the url schem - then the browser will use the protocol that was used to bring up the page. It looks odd but it is allowed and works:
<script src="//www.google.com/recaptcha/api.js?onload=recaptchaLoad&render=explicit" type="text/javascript" async defer></script>

If someone is accessing your site with http, then that call will use http but if they are accessing your site with https, then that call will use https. It won't work if you're just bringing the page up from the file system for testing though because then it tries to use a file:/ scheme which can't get out to the server.

-Seth
Reply all
Reply to author
Forward
0 new messages