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?
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.
Surface controller in dll
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
Hi Marianne,
Here we always have a solution with 2 projects:
Project.UI
andProject.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:this way we can access the SurfaceController in the Web project.
Hope this helps.
/Michaël
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
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:in our
Web
project we only install the Umbraco Core, using nuget: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
Thank you so much :)
No problem!
Glad it solved your issue.
Have a nice day.
/Michaël
is working on a reply...