Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6060905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:52:41+00:00 2026-05-23T08:52:41+00:00

so i was able to make my recaptcha thing working but my problem is

  • 0

so i was able to make my recaptcha thing working but my problem is though, i want to have it appear only after 3 tries. one option that i have is to redirect the user to a View that will have the captcha already (duplicate of the login but with captcha) and then have him log in through that page. is there any other option? i feel like partial views would cause problems on Post of the page. what do you think is the best way to generate the captcha?

    <% using(Html.BeginForm()) {%>
      <%: Html.AntiForgeryToken() %>
      <%: Html.ValidationSummary() %>
      <label>Username:</label>
      <%: Html.TextBoxFor(m => m.Username) %>
      <br /><br />
      <label>Password:</label>
      <%: Html.PasswordFor(m => m.Password) %>
      <br /><br />
      <input type="submit" value="Login" />
      <%: Html.ActionLink("Register", "Register", "") %>
      <%: Html.ActionLink("Forgot Password", "Password", "") %>
      <%: Html.ActionLink("Forgot Username", "Username", "") %>


      <%: ReCaptcha.GetHtml(publicKey: "thisismykey", theme: "red") %>


    <% } %>

THanks,
G

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:52:41+00:00Added an answer on May 23, 2026 at 8:52 am

    You are passing in a model (hopefully a ViewModel). Why not add NumberOfFailedLogins to it?

    Then you could just put a bit of code around the Recaptcha saying

    <%: if (Model.NumberofFailedLogins > 3) { %>
    <%: ReCaptcha.GetHtml(publicKey: "thisismykey", theme: "red") %>
    <% } %>
    

    NOTE: I am used to Razor syntax, so apologies if the above is not perfect. I’m sure you get the idea!

    Obviously you would need to update NumberOfFailedLogins behind the scenes!

    EDIT: Just to clarify, the number of failed login attempts ought to be recorded in the membership database behind the scenes automatically (the act of attempting to login would do this; note that the ASP.NET Membership Provider automatically records the number of consecutive failed login attempts out of the box) and it is from there that the ViewModel obtains this information. So it doesn’t matter if you are using a bot to attempt to brute-force your way in, it can still be presented with the ReCaptcha after three attempts (and of course can be locked out too if desired).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to be able to make a line graph using GTK+ but I'm
We have the go button enabled but somehow we haven't been able to make
I'm able to make Facebook apps. But I have some problems. The documentation highlights
I just released my app but I am only able to make it compatible
I am not able to make a clear decision on this one. I am
I want to be able to make an HTTP call updating some select boxes
I want the user to be able to make some preferences like colors, prefered
I want to be able to make the changes to my .emacs file without
I want to be able to make an iphone and android app using php.
I'd like to be able to make an Ajax call using JSF/Seam/RichFaces and have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.