![]() ![]() If the PrivateKey value is valid, the page displays the ReCaptcha control and a button. Run the Recaptcha.cshtml page in a browser. Then add the keys to the _AppStart.cshtml file. You can get your public and private keys at If (ReCaptcha.Validate()) response passed! Replace the existing content with the following: showRecaptcha = true In the root folder of a website, create new page named Recaptcha.cshtml. Save the _AppStart.cshtml file and close it. ![]() Set the PublicKey and PrivateKey properties using your own public and private keys. ReCaptcha.PrivateKey = "your-private-key" If you don't already have a _AppStart.cshtml file, in the root folder of a website create a file named _AppStart.cshtml.Īdd the following Recaptcha helper settings in the _AppStart.cshtml file: Add the PublicKey and PrivateKey strings with your public When you've completed registration, you'll get a public key and a private key.Īdd the ASP.NET Web Helpers Library to your website as described in Installing Helpers in an ASP.NET Web Pages Site, if you haven't already. Register your website with the ReCaptcha service. The user response is validated by the ReCaptcha.Net service. The ReCaptcha helper displays an image of two distorted words that users have to enter correctly before the page is validated. In ASP.NET pages, you can use the ReCaptcha helper to render a CAPTCHA test that is based on the ReCaptcha service. (The distortion is supposed to make it hard for bots to decipher the letters.) Adding a ReCaptcha Test ![]() The most common type of CAPTCHA is one where you see some distorted letters and are asked to type them. A CAPTCHA is a challenge-response test in which the user is asked to do something that is easy for a person to do but hard for an automated program to do. CAPTCHA stands for Completely Automated Public Turing test to tell Computers and Humans Apart. You can help make sure that a user is real person and not a computer program by using a CAPTCHA to validate users when they register or otherwise enter their name and site. (A common motivation is to post the URLs of products for sale.) These are often left by automated programs (bots) that try to leave URLs in every website they can find. About CAPTCHAsĪny time you let people register in your site, or even just enter a name and URL (like for a blog comment), you might get a flood of fake names. The information in this article applies to ASP.NET Web Pages 1.0 and Web Pages 2. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |