Wednesday, June 11, 2014

ASP.NET Captcha control for .NET 4.0/4.5 and MVC

I have been using the Telerik RadCaptcha control for years in my applications, but recently I began having problems with it whereby users were reporting that they were entering the code displayed in the Captcha image but it was still reporting an error!

After doing a bit of searching on the Telerik RadControls forums, I discovered that this issue has been plaguing the Telerik RadCaptcha control for many years and is definitely not a new problem.

Therefore, I began to search around for alternative Captcha controls for ASP.NET.  Of course, the most obvious one that comes to mind is Google's ReCaptcha: https://www.google.com/recaptcha/intro/index.html

Unfortunately, even though it is maintained by Google, the ASP.NET Plugin has not been updated or refreshed in many years and does not even support common attributes available since ASP.NET v. 2.0 such as the ValidationGroup property.

So I began searching for other alternatives.  Of course, there are several homegrown alternatives as well as this free version on CodePlex: http://captchadotnet.codeplex.com/.  But, this one is also outdated and has not been refreshed in several years. 

This other Captcha CodePlex project is much newer and actually borrows from  Google's ReCaptcha: http://recaptchanet.codeplex.com/. It is relatively recent (about a year old), and works with both ASP.NET 4.0/4.5 and ASP.NET MVC.

However, the main problem that I have with ReCaptcha is that the Captcha words and text are relatively complex and difficult to read in general.  I often have trouble getting the words correctly even after trying multiple times.  For users that want to visit a website and just fill out a form or register online and then go do something else, they can get easily frustrated by prompts containing very hard or difficult to read text.

Therefore, I preferred an easier alternative that was frequently maintained and supported the latest versions of ASP.NET Web Forms and MVC.  Fortunately, I found one such Captcha control from Lanapsoft called BotDetect Captcha: http://captcha.com/asp.net-captcha.html

BotDetect was a bit difficult to configure to get up and running (numerous Web.config changes are required), however, once it was up and running in my web application, it ran beautifully.  It prompted for relatively simple text to enter and quickly responded back if the Captcha text failed.

The company offers a free version (with some limitations such as obscuring the text with their trademark), but if you are building a commercial website, the $69 website license is well worth it.  Of course, if you are a developer, you can snag a developer license for $199, but you then have the freedom of unlimited deployments.

If you are looking for an excellent Captcha control for your ASP.NET Web Forms or MVC application, I would definitely recommend BotDetect Captcha!!

No comments:

Post a Comment