Copied to clipboard

Flag this post as spam?

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


  • Moran 285 posts 934 karma points
    Jul 04, 2016 @ 06:13
    Moran
    0

    using Google reCAPTCHA in umbraco

    Hi I am using umbraco 7.2.6 and I am trying to implement google's reCAPTCHA in my contact form. So far I tried using these extensions http://recaptchamvc.apphb.com/ https://www.nuget.org/packages/ReCaptcha-AspNet/1.3.0 but with no luck, I can't use these packages my umbraco application.

    Does anyone has a better idea?

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Jul 04, 2016 @ 06:36
    Michaël Vanbrabandt
    0

    Hi Moran,

    what is the problem with these extensions? Why can't you use these in your application?

    /Michaël

  • Moran 285 posts 934 karma points
    Jul 04, 2016 @ 07:58
    Moran
    0

    I get the following error in my ASP.NET app:

    Severity    Code    Description Project File    Line    Suppression State
    Error   CS1705  Assembly 'reCAPTCHA.MVC' with identity 'reCAPTCHA.MVC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Mvc' with identity 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    

    Tried to google it, but none of the solutions worked for me. Apparently the package "microsoft-web-helpers" prevents me from updating the "Microsoft.AspNet.Mvc" version.

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Jul 04, 2016 @ 08:20
    Michaël Vanbrabandt
    0

    Hi Moran,

    the problem is that you are using the Recaptcha for MVC 5 and your project is using MVC 4.

    You can try the following to solve this:

    1) Try to change the dependency in your web.config for MVC

    <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
      </dependentAssembly>
    

    2) Try to uninstall of upgrade your System.Web.Mvc to version 5

    /Michaël

  • Moran 285 posts 934 karma points
    Jul 04, 2016 @ 08:50
    Moran
    0

    Thanks Do you have any link for upgrading System.Web.Mvc?

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Jul 04, 2016 @ 08:53
    Michaël Vanbrabandt
    0

    Try the following command:

    Upgrade-Package Microsoft.AspNet.Mvc -Version 5.0.0
    

    /Michaël

  • Nik 1625 posts 7295 karma points MVP 7x c-trib
    Jul 04, 2016 @ 09:28
    Nik
    0

    There are some issues with updating MVC in the earlier version of Umbraco as the core is built around MVC 4 not MVC 5. There are a few guides milling around on how to update the MVC version, however you may still come across issues. At least I had a few with Umbraco 7.2.8.

    Your easiest option is to upgrade Umbraco to version 7.3+ in which MVC was updated from 4 to 5.

  • Alex Skrypnyk 6182 posts 24284 karma points MVP 8x admin c-trib
    Oct 04, 2016 @ 21:39
    Alex Skrypnyk
    0

    Hi Moran,

    For Umbraco Forms we created package with reCAPTCHA field, try it - https://our.umbraco.org/projects/collaboration/recaptcha-field-for-umbraco-forms/

    Thanks

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies