This project is read-only.

Using Captcha in Server Farm Environment

Apr 22, 2015 at 6:07 PM
Hey, We just used this captcha with one of our clients, and everything worked fine, but now that their production environment is in a distributed environment (multiple servers hosting the site), the captcha about 50% of the time returns the black image with a red x, and other times it seems work fine. Any idea what would cause this issue.


Apr 22, 2015 at 6:28 PM
Hi there,

By default the captcha uses the SessionStorageProvider that stores the values in session, and most likely it leads to a problem on distributed servers.
You can try to use the CookieStorageProvider using this code in global.asax:
protected void Application_Start()
     CaptchaUtils.CaptchaManager.StorageProvider = new CookieStorageProvider();
Vyacheslav Volkov
Feb 1, 2016 at 8:21 PM

I am facing similar problem issue so I followed thread discussion

I changed Session Storage Provider to Cookie Storage one in my code

var captchaManager = new DefaultCaptchaManager(new CookieStorageProvider());

I can see more data in cookies but didn't try it on farm servers, have any one been able to test it on farm servers