Captcha not working on high load

4 posts, 0 answers
  1. Robert Oreb
    Robert Oreb avatar
    3 posts
    Member since:
    May 2010

    Posted 19 Oct 2010 Link to this post


    We've been using RadCaptcha (version 2010 Q1) control on a site for some time, but today when we've had higher load of visitors trying to confirm the displayed code, it wouldn't be accepted, but another code was displayed.

    It would take up to a 10 or so entries for the code to be accepted.
    Control is located inside update panel, as I've read on one of posts here that should be, it is the only control on the page.
    And it wasn't that much people loading, maybe 30 people entering and clicking in 5 minutes.

    Also, sometimes Captcha image is not loaded at all.

    No help with restarting pool, IIS, etc.

    This didn't use to happen on development or testing or live location previously, so it's unclear why sudden.
    Are there some updates done between versions 2010.1 and 2010.2 that might help with this?

    Thanks in advance...
  2. Pero
    Pero avatar
    1156 posts

    Posted 21 Oct 2010 Link to this post

    Hi Robert,

    I think that this problem is related to the fact that your web-site resides in web garden or web farm environment:
    • Web Farm - The application runs on more than one web server at the same time.
    • Web Garden - The application runs on a single server, but the server load is divided among many worker processes (more than one process are running the same application).

    RadCaptcha stores the CaptchaImage in the Cache object, by default. Usually, every server (or every worker process) has an independent Cache, which means that, when the page request is not handled by the same web server (worker process), the CaptchaImage will be null and a gray image will be shown. The more users on the site, the more the servers and processes will be switched, so more users will be rejected by the Captcha.

    To avoid this issue, you should store the CaptchaImage in the Session, and configure your server environment to use out of process SessionState (i.e. the Session object is shared among different processes and servers). Practically you need to:

    • Set the ImageStorageLocation property to Session;
    • Configure the httpHandler in the following way:
            <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession" verb="*" validate="false" />
            <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession" />

    If this does not help, please provide more information about the issue.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. jijo
    jijo avatar
    1 posts
    Member since:
    Mar 2020

    Posted 06 Mar in reply to Pero Link to this post

    Captcha image issue fixed. RadCaptcha is not valid in a live Environment
  4. Vessy
    Vessy avatar
    2276 posts

    Posted 11 Mar Link to this post

    Hi jijo,

    in order to work properly into a Load Balanced environment, the application has to be configured to share the same resources between the servers, making sure that all Machine keys values are the same. Please, follow the instruction in the following blog post, providing more detailed explanation on the matter:

    Progress Telerik

    Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
Back to Top