Copied to clipboard

Flag this post as spam?

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


  • Marianne Larsen 22 posts 94 karma points
    Mar 30, 2018 @ 13:28
    Marianne Larsen
    0

    Hi

    I'm setting up a site where i've created a login flow with external api calls and am saving the responses/results in sessions for later use. My login flow is created with surface controllers and i'm about to finish the sites function by submitting to a custom form module for Umbraco. I'm going to call a submit form by calling a surface controller that i do not have the source code of. It is only a dll, placed in the bin of my website. When i'm trying to render the form with Html.RenderAction... my website returns an error because it will try to look in my surface controllers for the action and not in the controller matching the name given in the renderaction.

    Is there anyway i can force the website to look in the correct dll for the controller?

    /Marianne

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Mar 30, 2018 @ 13:33
    Michaël Vanbrabandt
    0

    Hi Marianne,

    Here we always have a solution with 2 projects: Project.UI and Project.Web.

    Then a reference is made between the UI and WEB project.

    In the web project we have SurfaceControllers, Extension classes, Models and so on. Then in the UI project we include the namespace like:

     @using Project.Web.Controllers
    

    this way we can access the SurfaceController in the Web project.

    Hope this helps.

    /Michaël

  • Marianne Larsen 22 posts 94 karma points
    Mar 31, 2018 @ 10:01
    Marianne Larsen
    0

    Hi Michaël

    Thanks for your reply. I will try to create 2 projects in the solution. Currently i have a ASP,NET Web Application with umbraco installed, so i will have to split the surface controllers from that project into a new one.
    Do you have 2 ASP.NET Web Applications both with umbraco installed or how do you set up the UI and Web projects?

    I need my umbraco installation for handling texts and the administration of the custom form module. The surface controllers i've set up so far is for accessing the external api calls and storing the result/responses.

    /Marianne

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Mar 31, 2018 @ 10:27
    Michaël Vanbrabandt
    100

    Hi Marianne,

    yes you are right, we have 2 projects which are ASP.NET Empty Web Applications with references to MVC.

    Then in the UI project we install UmbracoCms, using nuget:

    install-package UmbracoCms
    

    in our Web project we only install the Umbraco Core, using nuget:

    install-package UmbracoCms.Core
    

    Then all .cs files are located in the Web project which is referenced in the UI project.

    Your views need to be placed in the UI project under the views folder.

    Hope this helps.

    /Michaël

  • Marianne Larsen 22 posts 94 karma points
    Apr 01, 2018 @ 13:31
    Marianne Larsen
    1

    Thank you so much :)

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Apr 01, 2018 @ 17:07
    Michaël Vanbrabandt
    0

    No problem!

    Glad it solved your issue.

    Have a nice day.

    /Michaël

Please Sign in or register to post replies

Write your reply to:

Draft