1

I have added a captcha (BotDetect CAPTCHA) to my asp.net MVC form. But it is working correctly in the http site but not working in https.

I followed below documentation.

https://captcha.com/doc/aspnet/asp.net-mvc-captcha-quickstart.html

This is my http site. enter image description here

But in https;

enter image description here

These are the errors i get in browser console.

/BotDetectCaptcha.ashx?get=script-include 404 (Not Found)
/BotDetectCaptcha.ashx?get=layout-stylesheet 404 (Not Found)
Uncaught ReferenceError: BotDetect is not defined
/BotDetectCaptcha.ashx?get=image&c=ExampleCaptcha&t=be41dfc9b19b449f98fdd794a00e1cfa 404 (Not Found)
/BotDetectCaptcha.ashx?get=reload-icon 404 (Not Found)
/BotDetectCaptcha.ashx?get=sound-icon 404 (Not Found)
Dumi
  • 1,414
  • 4
  • 21
  • 41

2 Answers2

0

I found the issue. I missed below in web.config (in Live).

<remove name="BotDetectCaptchaHandler" />
<add name="BotDetectCaptchaHandler" preCondition="integratedMode" verb="GET" path="BotDetectCaptcha.ashx" type="BotDetect.Web.CaptchaHandler, BotDetect" />
Dumi
  • 1,414
  • 4
  • 21
  • 41
0

I had similar issues that took way too long to resolve. Adding the following to the handlers fixed the issue for me.

resourceType="Unspecified"

such as:

<add name="BotDetectCaptchaHandler" preCondition="integratedMode" verb="GET" path="BotDetectCaptcha.ashx" type="BotDetect.Web.CaptchaHandler, BotDetect" resourceType="Unspecified" />

I found this at Problem mapping HttpHandler --> HTTP Error 404 Not Found

roon
  • 11
  • 1