You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: controls/captcha/troubleshooting/missing-image.md
+57-28Lines changed: 57 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,48 +14,77 @@ This help article treats issues with missing images in RadCaptcha and provides r
14
14
15
15
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:
16
16
17
-
## Handlers are not properly configured
17
+
*[Image HttpHandler is not Properly Configured](#image-httphandler-is-not-properly-configured)
More information is available in the [Getting Started]({%slug captcha/getting-started%}) article.
22
45
23
46
## WebFarm/WebGarden Scenario
24
47
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
25
53
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.
27
55
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**).
29
57
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.
31
59
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**
33
61
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>
35
73
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.
37
75
38
-
1. Configure the httpHandler in the following way:
76
+
## URL Rewrite Module or Routing
39
77
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.
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.
58
83
59
-
* Deploy the out-of-process Session State server that is provided with ASP.NET.
84
+
### See Also
60
85
61
-
* Manually configure each Web server to store Session State data on a SQL Server.
0 commit comments