C#,vb.net,MVC,Jquery,javascript,jscript,vbscript,html,vb,sharepoint,COM,WPF,WCF,Wwf,Asp,Asp.net,questions & answers,

Latest in Sports

Tuesday, October 14, 2014

Recaptcha Implementation | Need Guidance

For recaptcha security change, please go to the page (.aspx) of the application where you want to implement it and follow below steps :
 
- Firstly, add a reference for Recaptcha.dll to the project. You can download the latest .dll version from the net. Please be sure that the dll version is compatible with the application that you are developing in.
 
- Now on the aspx page, insert the following on top next to the page directive :
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
 
- Now add below reCAPTCHA control inside of the webform (i.e.<form runat="server">) tag
 
<recaptcha:RecaptchaControl
    ID="recaptcha"
    runat="server"
    PublicKey="your_public_key" (Enter the public key here)
    PrivateKey="your_private_key" (Enter the private key here)
    />
 
Please generate your own public and private keys from this link
https://accounts.google.com/ServiceLogin?service=recaptcha&passive=1209600&continue=https://www.google.com/recaptcha/admin/list&followup=https://www.google.com/recaptcha/admin/list
 
- Go to the code behind of the page and search for the imb_continue button(/or next button) and place below condition in the beginning for the validation of the recaptcha tool  by using (Page.isvalid) condition:
 
imb_continuebuttonclick()
{
 
(constant variables if any)
 
If (Page.isvalid)
{
whole body of the button.
}
else
{
string displaytext="Please check that the recaptcha tool is added correctly and matches the two words provided."
errordiv.display= displaytext; // You will need to define an errordiv in aspx page first or please check how other error messages are being shown in the page and display this message in the same manner.
}
}

Also helps


No comments:

Post a Comment