Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Captcha > RadCaptcha Image Rendering Problem(Captcha Image is not displaying)

Not answered RadCaptcha Image Rendering Problem(Captcha Image is not displaying)

Feed from this thread
  • Posted on Aug 9, 2011 (permalink)

    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

    Reply

  • Posted on Aug 11, 2011 (permalink)

    Hello Sagar,

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

    Getting Started.

    Thanks,
    Shinu.

    Reply

  • Slav Slav admin's avatar

    Posted on Aug 11, 2011 (permalink)

    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.

    Reply

  • Posted on Nov 17, 2011 (permalink)

    I am having same issue.  I have one captcha form in root of application, and another in subdirectory.  subdirectory instance doesnt render.

    Reply

  • Slav Slav admin's avatar

    Posted on Nov 21, 2011 (permalink)

    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

    Reply

  • Posted on Nov 21, 2011 (permalink)

    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>

    Reply

  • Slav Slav admin's avatar

    Posted on Nov 23, 2011 (permalink)

    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

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Captcha > RadCaptcha Image Rendering Problem(Captcha Image is not displaying)