Copied to clipboard

Flag this post as spam?

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


  • Leonardo Moura 21 posts 90 karma points
    Jan 16, 2018 @ 16:34
    Leonardo Moura
    0

    How to add MVC to an existing project?

    Hi everyone,

    Is possible add MVC to an existing Umbraco project?

  • Nigel Wilson 944 posts 2076 karma points
    Jan 16, 2018 @ 18:04
    Nigel Wilson
    1

    Hi Leonardo

    What version of Umbraco are you running ?

    When saying "add MVC", what are you meaning ? ie a standard ASP.NET MVC setup, Umbraco "flavoured" MVC, etc.

    More details would assist the community to provide feedback / thoughts.

    Cheers, Nigel

  • Leonardo Moura 21 posts 90 karma points
    Jan 16, 2018 @ 18:36
    Leonardo Moura
    0

    I am running the 7.7.4.

    I created a form and I am getting this error all the time when I running my application online on the web server:

    No route in the route table matches the supplied values. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: No route in the route table matches the supplied values.

    To work around this problem provisionally I have created a hybrid function with jQuery and PHP inside Umbraco and it is working perfectly, however, my boss wants everything to be with code behind.

    I am calling my control like this:

    @Html.RenderAction("RenderForm", "ContactSurface");
    

    I have inspected the umbracoSettings.config and I undestod that I am already using MVC:

    <defaultRenderingEngine>Mvc</defaultRenderingEngine>

    But I could understand for what reason on my local machine my Contact Form works and online on the server doesn't.

    I thought that should be something about the MVC because when I installed the Umbraco I did not use the MVC model in the Visual Studio.

    In the same way, I saw a forum explaining that I need to create a route file.

    I am fresh with Umbraco and C#.NET.

    May you help me with it?

  • Joshua Stewart 36 posts 128 karma points c-trib
    Jan 16, 2018 @ 20:40
    Joshua Stewart
    0

    Did you copy the compiled DLL from the bin folder of your project to your web server? The DLL should have the same name as your Umbraco Visual Studio project.

  • Leonardo Moura 21 posts 90 karma points
    Jan 17, 2018 @ 21:02
    Leonardo Moura
    0

    Joshua,

    I did it today, and I got a huge error. Seriously this freaked me out.

  • Joshua Stewart 36 posts 128 karma points c-trib
    Jan 17, 2018 @ 21:25
    Joshua Stewart
    0

    What error did you get? If your local matches the webserver code it shouldn't be throwing any errors.

Please Sign in or register to post replies

Write your reply to:

Draft