Blogiversity.org

Welcome to Blogiversity.org Sign in | Join | Help
in Search

Blog Day Afternoon

Take a walk on the mild side.

CAPTCHA Control for ASP.Net

Who hasn't built a website and had people putting garbage in the "Contact Us" form? The new version of this website, Blogiversity.org, wasn't live two days before I started receiving trash through the "Contact Us" form. I decided it was time to investigate ways to make sure it was a human filling out and submitting the form. As usual, I wanted to find a control that someone else had built and was giving away from free. God bless the internet and programmers who are very willing to share their experiences!

I found a wonderful solution for a CAPTCHA server control for ASP.NET that can be downloaded here. The article does an excellent job of explaining how it works. I had a few concerns about whether I would be able to implement this CAPTCHA control into the Community Server program (CS2007), but I had it up and running well very quickly. All it required was the following steps:

  1. Put the WebControlCaptcha.dll file in the bin directory.
  2. Add the following to the web.config file under httpHandlers:
    <add verb="GET" path="CaptchaImage.aspx" type="WebControlCaptcha.CaptchaImageHandler, WebControlCaptcha"/>
  3. Put a Captcha contol and a Validate Summary control on the webpage. I didn't even have to change any of the default settings.
    <cc1:CaptchaControl ID="CaptchaControl1" runat="server" />
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
    
  4. Add a reference to the assembly at the top of the webpage.

    <%@ Register Assembly="WebControlCaptcha" Namespace="WebControlCaptcha" TagPrefix="cc1" %>

It works beautifully. I have not had any trash posts since it was installed.

Published Aug 24 2007, 02:24 PM by Blogette
Filed under:
Add to Bloglines Add to Del.icio.us Add to digg Add to Facebook Add to Google Bookmarks Add to Newsvine Add to reddit Add to Stumble Upon Add to Shoutwire Add to Squidoo Add to Technorati Add to Yahoo My Web

Comments

No Comments

Leave a Comment

You must log in first to post a comment. Click here to log in.

Not a member? Click here to sign up today!