This is a migrated thread and some comments may be shown as answers.

Captcha not working on high load

3 Answers 247 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
Robert Oreb
Top achievements
Rank 1
Robert Oreb asked on 19 Oct 2010, 03:51 PM
Hello...

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...

3 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 21 Oct 2010, 10:05 PM
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:
    <configuration>
       
    <system.web>
       
    <httpHandlers>
       
          <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession" verb="*" validate="false" />
       
    </httpHandlers>
       
    </system.web>
       
         
       
    <system.webServer>
       
    <handlers>
       
          <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession" />
       
    </handlers>
       
    </system.webServer>
       
    </configuration>

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

Regards,
Pero
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
0
jijo
Top achievements
Rank 1
answered on 06 Mar 2020, 01:07 PM
Captcha image issue fixed. RadCaptcha is not valid in a live Environment
0
Vessy
Telerik team
answered on 11 Mar 2020, 09:39 AM

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:

https://www.telerik.com/blogs/integrate-radcontrols-for-asp.net-ajax-in-a-webfarm-or-webgarden

Regards,
Vessy
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.
Tags
Captcha
Asked by
Robert Oreb
Top achievements
Rank 1
Answers by
Pero
Telerik team
jijo
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or