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

RadCaptcha Image Rendering Problem(Captcha Image is not displaying)

12 Answers 594 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
Sagar
Top achievements
Rank 1
Sagar asked on 09 Aug 2011, 11:09 AM
I've inserted RadCaptcha control on login.aspx page.I've radscriptmanager on the same page.
when I run this page,in Firebug i found "src" property of image sets to -

src="../Telerik.Web.UI.WebResource.axd?type=rca&guid=bff339e1-b3e3-4af8-aaca-0ca8cf274883"

& if I hover mouse on this property it says "failed to load given URL."

but on other page I tried the same thing and found that src sets to
src="Telerik.Web.UI.WebResource.axd?type=rca&guid=bff339e1-b3e3-4af8-aaca-0ca8cf274883"

Difference is only "../"


Can you please tell me how to solve this problem?
In Firebug,If I manually remove syntax "../" from src property then only Image loads.

Please reply ASAP.


Thanks

12 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Aug 2011, 11:16 AM
Hello Sagar,

The following article shows how to create a simple page with RadCaptcha

Getting Started.

Thanks,
Shinu.
0
Slav
Telerik team
answered on 11 Aug 2011, 01:14 PM
Hi Sagar,

Most probably the URL of RadCapthca's image cannot be resolved. Such behavior may be caused by the location of the ASPX page, in which the captcha resides.

Please note that at the current state of affairs I am mostly guessing what is your configuration. Could you please provide more detailed description of your scenario or a live URL to your project so that we can inspect it locally and suggest a more to the point answer?

Greetings,
Slav
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Bruce
Top achievements
Rank 2
answered on 17 Nov 2011, 04:59 PM
I am having same issue.  I have one captcha form in root of application, and another in subdirectory.  subdirectory instance doesnt render.
0
Slav
Telerik team
answered on 21 Nov 2011, 03:07 PM
Hello Bruce,

The described issue is quite specific and currently I am unaware of your setup, so I will need to examine your code and reproduce the problem in order to provide a working solution. Please open a support ticket and send a sample, runnable project that isolates the issue so that we can inspect it locally and suggest an approach for resolving the problem.

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
0
Bruce
Top achievements
Rank 2
answered on 21 Nov 2011, 04:49 PM
Yes, thank you for quick response and I apologize for vagueness in issue.

If i could explain this a bit:

We have URL rewriting at the global.asax and httphandlers level.

We then have our Contact Form (containing the RadCaptcha control) in a Web User Control.

That user control is located at:
~/controls/ticc/public/ContactForm.ascx

It is then contained in a web form located at:
~/sales/default.aspx

The user can navigate to that web form using a number of paths and these paths dictate the information displayed.

So the URL could expand out quite a bit (/sales/CARGO/WELLS-CARGO) or resolve directly to /sales/default.aspx.

I have noticed in web forms that are in the root of the application, the radcaptcha displays just fine.

does that give you insight? or do you need more? here is contactform.ascx

<asp:Panel ID="Panel1" runat="server">
                              
                               <h5>Contact Us</h5>
                             
                               <asp:TextBox ID="fname" runat="server" Text="first name" CssClass="contact-input input-thin"></asp:TextBox>
                                    
                                  <asp:TextBox ID="lname" Text="last name" runat="server" CssClass="contact-input input-thin"></asp:TextBox>
                                  <asp:TextBox ID="email" Text="email address" runat="server" CssClass="contact-input input-wide"></asp:TextBox>
                                   <asp:TextBox ID="comments" runat="server" Text="comments" CssClass="contact-textarea input-wide input-tall" TextMode="MultiLine"></asp:TextBox>
                                    
 
                                   <telerik:RadCaptcha ImageStorageLocation="Cache" ID="RadCaptcha1" CaptchaTextBoxLabel=""  runat="server" validationgroup="Submit">
                       </telerik:RadCaptcha>
 
                                 
                                   <div>
                                    
                                       <asp:ImageButton Imageurl="/themes/main/images/btn-submit.gif" ID="ImageButton1" runat="server" />
                                  
                                   </div>  </asp:Panel>
 
                                    <asp:Literal ID="Literal1" runat="server"></asp:Literal>

0
Slav
Telerik team
answered on 23 Nov 2011, 02:18 PM
Hi Bruce,

Most probably the URL rewriting is causing the encountered problem by rewriting the path to the resources, needed in order to display the image.

To resolve the issue you can use the following approaches:
1. Set the correct path in the RadCaptcha's property HttpHandlerUrl, which specifies the URL of the HTTPHandler that serves the captcha image. Its default value is "~/Telerik.Web.UI.WebResource.axd".
2. Exclude URLs containing the HTTPHandler from the rewritten paths or don't use URL rewriting at all.

If you are still having difficulties, after trying the suggestions above, please send a live URL to the problematic page so that we can check if there are errors and if the paths are constructed properly .

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
Prakash
Top achievements
Rank 1
answered on 06 Sep 2012, 09:55 AM
Hi,

we have bought licence of Telerik controls i am facing weird issue with Rad captcha in Login page,
captcha image is not rendering in sharepoint 2010 login page but where as the captcha image renders in asp.net page.

could you please suggest me what would be the reason.

Regards
Prakash Patil


 
0
Slav
Telerik team
answered on 10 Sep 2012, 11:02 AM
Hi Prakash,

Please check if the httpHandler of the RadChaptcha's image is registered in your Sharepoint project as described in step 2 of the help article Getting Started.

Also, if you are using authentication you should allow access to the RadCaptcha httpHandler to all users as shown in the following code snippet:
<location path="Telerik.Web.UI.WebResource.axd">
    <system.web>
        <authorization>
            <allow users="*"/>
        </authorization>
    </system.web>
</location>

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.
0
Ibrahim
Top achievements
Rank 1
answered on 14 Feb 2014, 01:21 PM
Hi Telerik Team,

We are using licensed Telerik.Web.UI.dll , Version 2010.3.1317.35  RadCaptcha control.
In my dev machine RadCaptcha control is rendering properly. Where as from other machines "Attempted to Divide By Zero" error
happening. We've no way to figure it out!

Environment Details:
Windows Server 2008 R2 (all are using same version)
Sharepoint 2010
Telerik.Web.UI.dll (GAC) - in all machines same version
Same web.config file settings in all machines.

please give us a quick feedback with solution or root cause.

note: other machines also are in same domain.
0
Ibrahim
Top achievements
Rank 1
answered on 16 Feb 2014, 09:53 AM
Hi Telerik Team,

We are using licensed Telerik.Web.UI.dll , Version 2010.3.1317.35  RadCaptcha control.
In my dev machine RadCaptcha control is rendering properly. Where as from other machines "Attempted to Divide By Zero" error
happening. We've no way to figure it out!

Environment Details:
Windows Server 2008 R2 (all are using same version)
Sharepoint 2010
Telerik.Web.UI.dll (GAC) - in all machines same version
Same web.config file settings in all machines.

HOW we are using RadCaptcha control?
we embeded only telerik radcaptcha control in a user control as we already have Script Manager in our master page.
eg: <telerik:RadCaptcha id=radCaptcha runat=server/>

In my machine its working fine , where as in other machines we are getting "Attempted to Divide By Zero" error. 
So in my colleague machine i'v changed the id of RadCaptcha control from "radCaptcha" to "radCaptcha1" and removed all temp asp.net files and deploy the solutions to their local environment and it starts working for once. after i rebuild and do deploy of other code which is not part of radcaptcha and again "Attempted to Divide By Zero" error happening..

Please help us with this issue, we dont have any clue in this!

Thank you for your Quick responses..
Ibrahim


please give us a quick feedback with solution or root cause.

note: other machines also are in same domain.
0
Ibrahim
Top achievements
Rank 1
answered on 17 Feb 2014, 06:24 PM
Hi Telerik Team,

myself identified  the "Attempted to divide by zero" issue. We made some configuration value for Captcha Text Length and it was 0(Zero)

Thanks
Ibrahim 
0
Slav
Telerik team
answered on 19 Feb 2014, 11:45 AM
Hello Ibrahim,

Setting CaptchaImage-TextLength to 0 is not a supported scenario, because in this case there will not be text in the image of RadCaptcha. Nevertheless, the error message that is displayed could be improved so that it is clearer why the exception is thrown. I have logged this as a feature request in our feedback portal: http://feedback.telerik.com/Project/108/Feedback/Details/119881.

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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Captcha
Asked by
Sagar
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Slav
Telerik team
Bruce
Top achievements
Rank 2
Prakash
Top achievements
Rank 1
Ibrahim
Top achievements
Rank 1
Share this question
or