Skip to content

Commit d68d64f

Browse files
added content to missing image article
1 parent 71a6dff commit d68d64f

File tree

1 file changed

+57
-28
lines changed

1 file changed

+57
-28
lines changed

controls/captcha/troubleshooting/missing-image.md

Lines changed: 57 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,48 +14,77 @@ This help article treats issues with missing images in RadCaptcha and provides r
1414

1515
Generally, issues with missing captcha image are caused by the HttpHandler that serves the image itself. You can find below a list with the most common scenarios for such issues:
1616

17-
## Handlers are not properly configured
17+
* [Image HttpHandler is not Properly Configured](#image-httphandler-is-not-properly-configured)
18+
* [WebFarm/WebGarden Scenario](#webfarmwebgarden-scenario)
19+
* [Authentication Blockage](#authentication-blockage)
20+
* [URL Rewrite Module or Routing](#url-rewrite-module-or-routing)
21+
* [Proxy, Firewall or Plugin Blockage](#proxy-firewall-or-plugin-blockage)
1822

19-
## URL Rewrite Module
23+
## Image HttpHandler is not Properly Configured
2024

21-
## Authentication Blockage
25+
You should ensure to properly define the httpHandler that serves the captcha image in the `web.config` file (**Example 1**).
26+
27+
>caption **Example 1**: Configure the httpHandler that server the captcha image in the web.config file.
28+
29+
**XML**
30+
31+
<configuration>
32+
<system.web>
33+
<httpHandlers>
34+
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
35+
</httpHandlers>
36+
</system.web>
37+
<system.webServer>
38+
<handlers>
39+
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
40+
</handlers>
41+
</system.webServer>
42+
</configuration>
43+
44+
More information is available in the [Getting Started]({%slug captcha/getting-started%}) article.
2245

2346
## WebFarm/WebGarden Scenario
2447

48+
By default the image is stored in the Cache. However, if more than one server is used to host the page (web-farm environment) the Session should be used, because if the Cache is used the image is stored locally on the server.
49+
50+
You can examine the [Using WebFarm or WebGarden Environment]({%slug captcha/troubleshooting/using-webfarm-or-webgarden-environment%}) article that showcases how to store the `CaptchaImage` in the Session.
51+
52+
## Authentication Blockage
2553

26-
By default the RadCaptcha control stores the CaptchaImage in the Cache object. In case your application is configured to run in any of the environments, listed below, there will be a problem accessing the captcha image:
54+
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.
2755

28-
* **Web Farm** - The application runs on more than one web server at the same time.
56+
To resolve the issue you can add <location> elements to your web.config for all the handlers you use, so ASP.NET does not block them (**Example 2**).
2957

30-
* **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).
58+
>caption **Example 2**: Add a location element to the web.config for the httpHandler that serves the captcha image.
3159
32-
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.
60+
**web.config**
3361

34-
To avoid this behavior, you should store the CaptchaImage in the Session, and configure your server environment to use out of process Session State(i.e. the Session object is shared among different processes and servers). Practically you need to:
62+
<configuration>
63+
...
64+
<location path="Telerik.Web.UI.WebResource.axd">
65+
<system.web>
66+
<authorization>
67+
<allow users="*"/>
68+
</authorization>
69+
</system.web>
70+
</location>
71+
...
72+
</configuration>
3573

36-
1. Set the **ImageStorageLocation** property of RadCaptcha to **Session**;
74+
More information on the matter is available in the [Unauthorized Access (401) Error]({%slug introduction/radcontrols-for-asp.net-ajax-fundamentals/troubleshooting/web-resources-troubleshooting%}#unauthorized-access-401-error) section of the [Web Resources Troubleshooting]({%slug introduction/radcontrols-for-asp.net-ajax-fundamentals/troubleshooting/web-resources-troubleshooting%}) article.
3775

38-
1. Configure the httpHandler in the following way:
76+
## URL Rewrite Module or Routing
3977

40-
>caption web.config:
78+
When you configure your application to use a [Routing](https://msdn.microsoft.com/en-us/library/cc668201.aspx) or [URL Rewriting Module](https://msdn.microsoft.com/en-us/library/ms972974.aspx) the requests of the application may be changed. You should ensure the request for the captcha's image is not modified.
4179

42-
**XML**
43-
44-
<configuration>
45-
<system.web>
46-
<httpHandlers>
47-
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession" verb="*" validate="false" />
48-
</httpHandlers>
49-
</system.web>
50-
<system.webServer>
51-
<handlers>
52-
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResourceSession" />
53-
</handlers>
54-
</system.webServer>
55-
</configuration>
80+
## Proxy, Firewall or Plugin Blockage
5681

57-
1. Ensure that you have configured your server environment to use [out of process Session State](http://msdn.microsoft.com/en-us/library/ms972429.aspx). In order to setup such Session State, you can apply any of the following solutions:
82+
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.
5883

59-
* Deploy the out-of-process Session State server that is provided with ASP.NET.
84+
### See Also
6085

61-
* Manually configure each Web server to store Session State data on a SQL Server.
86+
* [Getting Started]({%slug captcha/getting-started%})
87+
* [Using WebFarm or WebGarden Environment]({%slug captcha/troubleshooting/using-webfarm-or-webgarden-environment%})
88+
* [Unauthorized Access (401) Error]({%slug introduction/radcontrols-for-asp.net-ajax-fundamentals/troubleshooting/web-resources-troubleshooting%}#unauthorized-access-401-error)
89+
* [Routing](https://msdn.microsoft.com/en-us/library/cc668201.aspx)
90+
* [URL Rewriting Module](https://msdn.microsoft.com/en-us/library/ms972974.aspx)

0 commit comments

Comments
 (0)