数字序列验证码图像,例如"2,4,_,8" [英] Number sequence Captcha image, E.g "2,4,_,8"

查看:87
本文介绍了数字序列验证码图像,例如"2,4,_,8"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我吗,我正在构建一个个人的asp.net Web应用程序
在C#中,我想包含一个Captcha.我决定使用一个数字序列,例如"2,4,_,8".用户必须填写缺少的值.另外,每次尝试时,占位符都必须更改.我还希望验证码监视不成功的IP(即标记它们).在此先感谢

Can somebody please assist me, i am building a personal asp.net web application
in C# and i want to include a Captcha.I have decided to use a number sequence, as in "2,4,_,8". The user must fill in the missing value. Also, the placeholder must change on each attempt. I also want the Captcha to monitor unsuccessful IP(i.e Flag them). Thanks in advance

推荐答案

请参见
CAPTCHA图像 [ http://www.knowlegezone.com/documents/80/Simple-ASPNET-CAPTCHA-Tutorial / [ ^ ]
用于ASP.NET的CAPTCHA服务器控件 [
See
CAPTCHA Image[^]
http://www.knowlegezone.com/documents/80/Simple-ASPNET-CAPTCHA-Tutorial/[^]
A CAPTCHA Server Control for ASP.NET[^]


已经有一个ASP.NET为此的服务器控制称为MScaptcha.它是一个免费的控制.您可以从以下站点下载其dll

http://www.mondor.org/captcha.aspx [
there is already a ASP.NET server control for this called MScaptcha. its a free control. You can download its dll from the following site

http://www.mondor.org/captcha.aspx[^]


You will get proper documentation, regarding how to use it.

Still for youe help, belowgiven are brief steps how to implement it.

Download the dll and add its refrence to your project and then do the following.

//Web.config

      <httpHandlers>
<add verb="GET" path="CaptchaImage.axd" type="MSCaptcha.CaptchaImageHandler, MSCaptcha"/>

            </httpHandlers>


//In  Aspx page or in user control

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

<cc1:CaptchaControl ID="ccJoin" runat="server" CaptchaBackgroundNoise="none" CaptchaLength="5" CaptchaHeight="60" CaptchaWidth="200" CaptchaLineNoise="None" CaptchaMinTimeout="5" CaptchaMaxTimeout="240" />


///C# Code

Button click event

  ccJoin.ValidateCaptcha(txtcaptchatext.Text.Trim());

  if (ccJoin.UserValidated)
        {
//submit form
  }


这篇关于数字序列验证码图像,例如"2,4,_,8"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆