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

Reusing RadCaptcha

4 Answers 72 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
An
Top achievements
Rank 1
An asked on 05 Aug 2013, 12:40 PM
I am putting RadCaptcha in a usercontrol .ascx so I can re-use it in several pages on "my" website.   I put the .ascx with the RadCaptcha on 3 pages.  RadCaptcha image is displayed OK on the first page, but it blanks out after a "refresh", a click on a button, or after a "redirect" from other pages.  The RadCaptcha image does not display at all from the remaining 2 pages.

A work-around is to enable the "Generate New Image" lnk button, but this is kind of strange, making the users generate a new image everytime.

Can I put RadCaptcha in an .ascx and re-use it?  I do not want to put 3 separate RadCaptcha on 3 separate pages, this would make maintenance a pain.  Is this a correct approach to using RadCaptcha?

Here my snippet:

 

 

 

<telerik:RadCaptcha ID="RadCaptcha1" runat="server" ErrorMessage="Enter code below" EnableRefreshImage="true" RegisterWithScriptManager="true"

 

 

 

ValidationGroup="Group" CaptchaTextBoxLabel="" Font-Size="8pt">

 

 

 

</telerik:RadCaptcha>

 

 

 

Thanks for responding.

4 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 07 Aug 2013, 10:52 AM
Hello An,

There shouldn't be an issue with the captcha image, whether it is in a user control, or directly on the page.
Blank images can occur in webfarm/webgarden scenarios when they are not properly configured, so I can suggest that you examine the following help article on the matter: http://www.telerik.com/help/aspnet-ajax/captcha-webfarm-and-webgarden.html.
You can also check with the dev toolbar of the browser whether the requests all return correctly, it is possible that a module like an URL rewriter or proxy is breaking them.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
An
Top achievements
Rank 1
answered on 14 Aug 2013, 12:56 PM
Hi Marin,

I followed the instructions on the WebFarm/Web Garden article and configured the session to store data to SQL database.  It works perfectly in the test environment but not on the production environment.  If I go directly to the production server, then the RadCaptcha displays initially, but it is grayed out after a server redirect, either on the website itself or from another website.

I can give you the URL if you want to take a look at.

Thanks.



0
Slav
Telerik team
answered on 16 Aug 2013, 03:39 PM
Hello An,

Please ensure that the Session on the production environment is configured as described in the help article that Marin suggested.

A live URL to your page could be useful for inspecting the problem, as well as the web.config file of your project.

Regards,
Slav
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
An
Top achievements
Rank 1
answered on 16 Aug 2013, 04:38 PM

Hello Slav,

 

I did have the ImageStorageLocation set to "Session" as the article suggested.  I also set up the ASPState database and have captured all the hit request.  However, the image is still grayed out after initial hit to the page, as well as any redirect from the website or other website.

I now am able to get the image to refresh, with OnClientLoad event, so the image now appears everytime. 

Thanks.

An
Site:  https://sbecs.treas.gov

Tags
Captcha
Asked by
An
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
An
Top achievements
Rank 1
Slav
Telerik team
Share this question
or