crosspost from http://rextang.net/blogs/work/
Although I am planning to upgrade my blog site to the latest version of CommunityServer 2.x, I was too busy to have few days to make the modifications and new skin design, and my site is on heavy attack of comment spam. I am thinking to put one more shelter to defend this, behind the already installed ReverseDOS.
DanBartels' CAPTCHA control can be downloaded from CommunityServer website. I downloaded it since last year, but can not install it successfully by following the ReadMe.doc file. everything seems to fit the settings but the image just don't show.
Today I did some more study about this and finally found that it's because of missing class reference in JpegCaptchaImage.aspx file, which should be copied to "images" folder of using skin. the original file had the control header like this:
<%@ Page language="c#" CodeBehind="JpegCaptchaImage.aspx.cs" AutoEventWireup="false" Inherits="DanBartels.CS.CAPTCHA.JpegCaptchaImage" %>
when directly run this aspx file, it will tell you that it can not find the type "DanBartels.CS.CAPTCHA.JpegCaptchaImage" , which in the bin folder, the dll name is "DanBartels.CS.CAPTCHA.dll" . that should be the reason that the image can not be shown to the comment form.
to solve this, simple clear those CodeBehind and Inherits settings, like this:
<%@ Page language="c#" AutoEventWireup="false" %>
save the file and done. now the comment form can display digits for user to type before submit the comments.
wish this can stop some spams before I upgrade my site to CS 2.x...
Technorati Tags: communityserver , programming , asp.net
Posted
Aug 15 2006, 03:20 AM
by
Rex Tang