Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Rhonda 2 posts 22 karma points
    May 12, 2015 @ 22:35
    Rhonda
    0

    CaptchaMVC image not displaying in Umbraco 7 form using surface controller

    I am using Umbraco 7 and included the CaptchaMVC package. My form, which leverages a surface controller, contains the following code in my CSHTML file, but the captcha image is not displayed; however, the Refresh and Input Symbol fields are. When I look at the HTML using Chrome's debugging tools, I see the src for the img tag is empty.

    <div class="captcha-column">
        @Html.Captcha(5)
    </div>
  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    May 12, 2015 @ 22:47
    Dennis Aaen
    0

    Hi Rhonda and welcome to our,

    Perhaps this post from stackoverflow can help you to solve the issue that you have to get the captcha image to display

    http://stackoverflow.com/questions/16168631/captha-image-not-getting-generated-in-mvc4

    Hope this can help you,

    /Dennis

  • Rhonda 2 posts 22 karma points
    May 12, 2015 @ 23:00
    Rhonda
    0

    Thank you Dennis. Unfortunately, that post did not help. The reference to CaptchaMvc.dll had already been added through Nuget with appropriate references. I think it is related to the way CaptchaMvc is generating the image through Umbraco. I already have this working in a non-Umbraco website using Visual Studio and am currently converting the website to use Umbraco due to all the static content in the website.

  • Srdjan 19 posts 53 karma points
    Dec 12, 2015 @ 14:58
    Srdjan
    0

    Hi @Rhonda,

    have you ever solved this issue? I have a similar problem with:

    @Html.MathCaptcha("Try another", "The answer is:", "The answer is required.", true)
    

    Thanks, Srdjan

  • navneet kaur 11 posts 103 karma points
    Jun 21, 2017 @ 09:13
    navneet kaur
    0

    Hello Rhonda,

    Have you solved this issue ? I am facing the same problem using captchaMVC4.MVC dll in Umbraco7.

  • Arun Kumar Verma 1 post 71 karma points
    Oct 23, 2020 @ 05:15
    Arun Kumar Verma
    0

    Hi, That will not work with Umbraco because Umbraco routing is different from default MVC routing. Captcha MVC needs hit the "/DefaultCaptcha/Generate", URL, but in Umbraco that is not available, so you to add the custom route, see the following link:- https://medium.com/@victorighalo/how-to-make-your-own-custom-routes-in-umbraco-attribute-and-convention-based-routing-c9a4d7579e97

    And you add the custom route for Captcha MVC like the following:-

    routes.MapRoute( name: "CaptchaMvcRoute", url: "DefaultCaptcha/{action}", defaults: new { controller = "DefaultCaptcha", action = "Index" } );

Please Sign in or register to post replies

Write your reply to:

Draft