Copied to clipboard

Flag this post as spam?

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


  • Martin 278 posts 662 karma points
    Mar 09, 2017 @ 15:36
    Martin
    0

    Umbraco Cloud + How to Build A Site with Umbraco Series

    Hi all,

    I'm following along with Paul Seals great How to build a site with Umbraco series on youtube.

    I have an Umbraco Cloud site set up locally and i'm trying to implement the controller approach that Paul is showing. However i'm getting an error with the RenderAction.

    My code is the same as the in the tutorial, although I think the placement of the folders and the file is causing problems.

    I understand that the Controllers / Models / View should be created with .Core project, but i'm not sure I whats missing to cause the error.

    "No route in the route table matches the supplied values."

    Line 15:   <body>    
    Line 16:    
    Line 17:     @{ Html.RenderAction("RenderHeader","SiteLayoutController"); }  
    Line 18:        
    Line 19:     <div class="cd-main-content">
    

    Any help would be grateful.

    Martin

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Mar 09, 2017 @ 18:17
    Alex Skrypnyk
    0

    Hi Martin

    Share please your controller code.

    Did you build .Core project, so all your code is in bin folder of web-site?

    Thanks,

    Alex

  • Paul Wright (suedeapple) 277 posts 704 karma points
    Mar 09, 2017 @ 18:26
    Paul Wright (suedeapple)
    0

    Might be something do with the tutorial being a "Visual Studio WebApplication Project", whereas your Umbraco Cloud instance, is most likely to be a "Visual Studio WebSite Project".

    If it's a "WebSite", then your controller folder should reside in the "App_Code" folder.

  • Micha Somers 134 posts 597 karma points
    Mar 09, 2017 @ 21:11
    Micha Somers
    100

    The name of the controller is different.

    Try to remove the "Controller" part from the name "SiteLayoutController":

    @{ Html.RenderAction("RenderHeader","SiteLayoutController"); }
    

    ==>

    @{ Html.RenderAction("RenderHeader","SiteLayout"); }
    

    Please let us know if the RenderAction runs successfully this way.

  • Martin 278 posts 662 karma points
    Mar 10, 2017 @ 08:35
    Martin
    1

    Thanks Micha,

Please Sign in or register to post replies

Write your reply to:

Draft