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.
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.
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.
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
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.
Hi @Rhonda,
have you ever solved this issue? I have a similar problem with:
Thanks, Srdjan
Hello Rhonda,
Have you solved this issue ? I am facing the same problem using captchaMVC4.MVC dll in Umbraco7.
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" } );
is working on a reply...