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

Rad captcha image refreshing only once

3 Answers 270 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Jiju
Top achievements
Rank 1
Jiju asked on 04 May 2012, 11:35 AM
Hi,
In my page, when clicking on generate new image linkbutton of the radcaptcha, the captcha image refreshes once.
but when clicking on second time, no postback happens.
please provide your feedback

Thanks
Jiju

3 Answers, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 07 May 2012, 10:00 AM
Hello Jiju,

Most probably the second request for the RadCaptcha image is not successful. I will need a more detailed description of your setup and the encountered problem as it appears to be specific to your implementation. You can use the Net tab of Firebug or the Developer tools of Internet Explorer in order to check if there is a problem with the captcha image request.

If you are using URL Rewriting the specified rule may rewrite requests made to WebResource and thus break the RadCaptcha refresh image functionality. You can check this article for more information if this is the case.

Note that currently I am mostly guessing as to what your setup is. If you are still having difficulties, please send a live URL to your problematic page so that I can examine the issue and provide a more to the point answer.

Kind regards,
Slav
the Telerik team
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 their blog feed now.
0
Jiju
Top achievements
Rank 1
answered on 11 May 2012, 01:12 PM
Hello Slav,

Now I have replaced the 'Generate New Image' button of RadCaptcha with a link button and new textbox to enter the captcha text in order to validate. On the click event of link button, i'm performing a postback so that captcha image gets refreshes without any issue. But now another issue is that the text is always validated as false. This is because, what i noticed from Net tab of FireFox is, after a postback, the captcha image refreshes twice(one intermediate change is happening) and the validation is done with the intermediate value. Hence the validation returns always false. The strange thing is that this validation is false not for all machines, but for some machines.

 Please provide your feedback.

Regards
Jiju.
0
Slav
Telerik team
answered on 15 May 2012, 03:23 PM
Hi Jiju,

Please verify if you are using Ajax on your page. By default the security code is changed every time the page goes through its life cycle, which happens during an Ajax request as well. Note that if the RadCaptcha is not updated on an Ajax request, the displayed code will remain the same, but the actual code will be reloaded due to the page's lifecycle. You can avoid this effect by setting the property CaptchaImage-PersistCodeDuringAjax to true in order to ensure that the captcha code will not be changed when the Ajax call is initiated.

If this is not the problem in your case, I have prepared two sample pages - the first demonstrating the default approach for image refresh and the second showing the method that you described. Please compare them with your actual project and let me know what changes should be made so that I can reproduce the problem on my end, as currently I am unable to do so.

All the best,
Slav
the Telerik team
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 their blog feed now.
Tags
Sharepoint Integration
Asked by
Jiju
Top achievements
Rank 1
Answers by
Slav
Telerik team
Jiju
Top achievements
Rank 1
Share this question
or