We've developed this component for ASP.NET in year 2004 to fullfill our needs
of secure and reliable CAPTCHA. However, we soon realized, that this component far
exceeds any commercial offers that existed at the time, so decision was made to
continue development and incorporate the best possible features and make it available
to anyone for free.
Since version 2.0, the project development is outsourced to our long time contributor,
who is responsible for evolution of this component, but we manage the code base
and make decisions regarding the future of the component.
Support is available through our forum only, but you are welcome to follow us on
Twitter to get the notification about upcoming releases and tips.
Key features of Mondor's Captcha ASP.NET Server Control:
- Ability to set any size for your captcha
- Set any alphabet (not necessarily English) and string length
- Set the level of noise and line noise
- Timer to make your captcha obsolete after specified period of time
- Set various fonts for your captcha
- Arithmetic functions require users to solve equations instead of simple typing
- XHTML 1.1 compliant
Planned enhancements:
- HTML 5 compatible output
- Audio playback of Captcha value
- Different colors for each symbol
- Random settings (noise, color etc) for each instance
- Tool for automatic registration of component in ASP.NET project
- Captcha proxy for centralized generation
Installation instruction:
- Unzip the downloaded file.
- Copy MSCaptcha.dll and MSCaptcha.xml files to your /bin application directory.
- In your ASP.NET application, add reference to mscaptcha.dll file.
- Modify your web.config file, by adding this line to <httphandlers>
section:
<add
verb
="GET"
path
="CaptchaImage.axd"
type=
"MSCaptcha.CaptchaImageHandler, MSCaptcha
"/>
If using IIS 7,
add name parameter
.
If using Captcha version 4, use "MSCaptcha.captchaImageHandler" instead.
- Add MSCaptcha control to your Visual Studio toolbox (optional)
- That's it!
Example of use:
- Add line to your .aspx file:
<%@
Register Assembly="MSCaptcha"
Namespace="MSCaptcha"
TagPrefix="cc1" %>
- Where needed, add the control itself:
<cc1
:CaptchaControl
ID="ccJoin" runat
="server" CaptchaBackgroundNoise="none"
CaptchaLength="5" CaptchaHeight
="60" CaptchaWidth="200"
CaptchaLineNoise="None"
CaptchaMinTimeout="5" CaptchaMaxTimeout="240"
/>
- Put a textbox somewhere in your page where your user must enter what he sees in
your captcha. Put this code (this example is in C#) to validate user input:
ccJoin.ValidateCaptcha(txtCap.Text);
if (!ccJoin.UserValidated)
{
//Inform user that his input was wrong ...
return
;
}
In this particular example the
ccJoin is the name of the Captcha control, the txtCap
is the textbox where user
entered what he sees in Captcha.
Example would produce captcha looking like that:
Essential parameters:
-
CaptchaBackgroundNoise
- either "none", "low", "medium", "high" or "extreme" - the amount of noise to add
to the picture to make it harder for OCR ("optical character recognition") software
to recognize. Beware that this also affects how your users will be able to read
and understand its content. So our recommendation is to set it to "none" and only
increase the level if you'll notice the presence of automatically registered bots
on your site.
-
CaptchaLength
- how many symbols captcha will contain. The recommended value is around 4-5, and
you should increase it only if have a real problem with spammers.
-
CaptchaHeight
and
CaptchaWidth
- the height and width (in pixels) of the generated image.
- CaptchaLineNoise -
adds lines to
your
image to further harden the OCR software work. The recommended starting
value
is
"None", although you can increase it later.
- CaptchaMaximeout
- timeout in seconds,
after
which your current captcha will become invalid. It is recommended to
keep
this value
relatively high and refresh (using AJAX, for example) your captcha when
it is
about to become invalid.
- CaptchaMinTimeout
- minimal time
period in
seconds for filling the captcha response. This means - if you set the
CaptchaLength to 5 seconds, any input entered in first 5 seconds after
Captcha's
generation will be rejected.
- CaptchaChars - the string of characters to
be used for Captcha generation. The default is "ABCDEFGHJKLMNPQRSTUVWXYZ23456789".
We recommend to avoid using chars like O, 0, 1 and I because using different fonts
they may confuse your users.
|
Comments ( 2 )
MSCaptcha.CaptchaImageHandler issue solution...http://mytecharticle.com/?p=632
Not working on shared hosting since it requires fulltrustlevel. Any idea how the problem can be resolved?