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

Captcha - Grey Box in Firefox

4 Answers 87 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
ZCCC
Top achievements
Rank 1
ZCCC asked on 11 May 2010, 08:00 PM
I'm using a single Windows 2008 server - not a web farm environment.  When I implement the captcha control in my application, everything works flawlessly in Internet Explorer (all versions).  However, when viewing my form in Firefox, sometimes all I get is a grey box.  When I click "Refresh Image", nothing happens.  This is only an issue in Firefox.

I have pasted the code control and parameters below, and have also attached a screenshot of the CAPTCHA properties window.  Please let me know of any other information you need from me to troubleshoot.

Thank you.

        <telerik:RadCaptcha ID="RadCaptcha1" Runat="server" ErrorMessage="You have entered an invalid code"
            ValidationGroup="Group" EnableRefreshImage="True"></telerik:RadCaptcha>

4 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 13 May 2010, 03:54 PM
Hi,

This is a very strange issue. The CapthcaImage is served by an HttpHandler, and by default the image is stored in the Cache. If the CaptchaImage object stored in the Cache is null, then a gray image will be rendered. This means that if a gray image is rendered it shouldn't depend on the browser. Just in case you can try storing the image in the Session, and see if the problem will disappear. This is how the control should be configured:
  • Set the ImageStorageLocation property to "Session"
  • Register the handler 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>

In case this does not resolve the issue, please provide a sample project that demonstrates the erroneous behaviour, or a live URL where the problem can be observed.

Greetings,
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
ZCCC
Top achievements
Rank 1
answered on 13 May 2010, 05:07 PM
Hi,

I implemented the solution as directed and am still experiencing this issue with Firefox when I upload it to the server (Windows Server 2008).  Is there anything that needs to be done on the server side to resolve this?  I don't experience this issue when testing on my local computer within Visual Studio, only when I upload it to the specified server.  My machine is running Windows XP; Visual Studio 2008 (ASP.net 3.5). 

Thank you.
0
ZCCC
Top achievements
Rank 1
answered on 13 May 2010, 06:56 PM
I moved the project from a Windows 2008 server and onto a Windows 2003 server and am not encountering any issue now with the grey box in FireFox.
0
Pero
Telerik team
answered on 17 May 2010, 02:03 PM
Hello,

You could try storing some string value in the Cache object on a button click, and then use another button that will retrieve the previously stored object in the Cache. If the value is null, when testing under Firefox, then I suppose the problem is something general that is not related to RadCaptcha. The following code line will add the string "CacheValue" to the Cache.
HttpRuntime.Cache.Add("CacheKey", "CacheValue", null, DateTime.Now.AddSeconds(Convert.ToDouble(5 * 60)),TimeSpan.Zero, CacheItemPriority.NotRemovable, null);
The same test can be performed with the Session object.

In case the problem persists, please send detailed information about your server configuration, and sample project to reproduce the issue locally. Moreover, if possible please provide a live URL, where we can test the Captcha and see if we are getting the same behavior.

Kind 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.
Tags
Captcha
Asked by
ZCCC
Top achievements
Rank 1
Answers by
Pero
Telerik team
ZCCC
Top achievements
Rank 1
Share this question
or