This help article treats issues with missing images in RadCaptcha and provides resolutions.
Generally, issues with missing captcha image are caused by the HttpHandler that serves the image itself. The list below shows solutions for the most common scenarios:
- Image HttpHandler Is Not Properly Configured
- WebFarm/WebGarden Scenario
- Open Anonymously Accessible SharePoint Site in Mobile Browser
- Authentication Blockage
- URL Rewrite Module or Routing
- Proxy, Firewall or Plugin Blockage
You should ensure that you have properly defined the HttpHandler that serves the captcha image in the
web.config file (Example 1).
<configuration> <system.web> <httpHandlers> <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" 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.WebResource" /> </handlers> </system.webServer> </configuration>
More information is available in the Getting Started article.
By default, the image is stored in the Cache. However, if more than one server is used to host the page (such as in a web-farm environment) the Session should be used, because the Cache image is stored locally on the server.
You can review the Using WebFarm or WebGarden Environment article that showcases how to store the
CaptchaImage in the Session.
When the RadCaptcha control is placed in a SharePoint site with anonymous access enabled and the site is viewed from a mobile browser, the CAPTCHA image may not appear if the HttpHandler is not configured properly.
To resolve the issue, you should ensure the HttpHandler that serves the CAPTCHA image is requested from a folder that can be accessed by anonymous users. Example 2 shows how to use the
HttpHandlerUrl property of the control to configure it to request the
Telerik.Web.UI.WebResource.axd handler in a folder (e.g., _layouts folder) that is accessible.
<telerik:RadCaptcha ID="RadCaptcha1" Runat="server" ErrorMessage="You have entered an invalid code." HttpHandlerUrl="~/_layouts/Telerik.Web.UI.WebResource.axd"> </telerik:RadCaptcha>
When your project uses a form of authentication (e.g., Windows Authentication), access to most resources (like pages, images, handlers) is not allowed for anonymous (unauthorized users). This affects the Telerik controls, including the RadCaptcha, because they use a number of HTTP Handlers that also get blocked.
To resolve the issue you can add
<configuration> ... <location path="Telerik.Web.UI.WebResource.axd"> <system.web> <authorization> <allow users="*"/> </authorization> </system.web> </location> ... </configuration>
When you configure your application to use a Routing or URL Rewriting Module the requests of the application may be changed. You should ensure that the request for the CAPTCHA's image is not modified.
It may be possible that some requests, including the CAPTCHA's image request, are blocked because of the existence of proxy, antivirus, firewall or a browser plug-in. You can try to disable all of them to ensure that is not the cause of the issue.