Hi all, i'm trying out the Cloud + VS 2019. I followed the guide on the website (https://our.umbraco.com/documentation/Umbraco-Cloud/Set-Up/Working-With-Visual-Studio/).
But I can't work my head around, how to call a surface controller in the .Core project from the .Web project. I've used the UaaS.cmd to clone the projects.
In a normal Umbraco solution (not cloud) i can call a controller by the url form "/umbraco/surface/{controllername}/{action}/" But when i call that now i just receive a 404.
I prefer to place models in the .Core project, especially if the project is in the active development stage.
When you need to make changes to the existing project I prefer do not change ModelsBuilder mode, so as it's set in the project I just continue the same way
Call surface controller (Cloud project)
Hi all, i'm trying out the Cloud + VS 2019. I followed the guide on the website (https://our.umbraco.com/documentation/Umbraco-Cloud/Set-Up/Working-With-Visual-Studio/). But I can't work my head around, how to call a surface controller in the .Core project from the .Web project. I've used the UaaS.cmd to clone the projects.
Screenshot of the solution in VS: https://www.screencast.com/t/vXpSV2mD8o
In a normal Umbraco solution (not cloud) i can call a controller by the url form "/umbraco/surface/{controllername}/{action}/" But when i call that now i just receive a 404.
Hope someone can help me on this one :)
Hi Henrik,
You have to build .Core project and copy .Core dll to the bin folder of the website to be able to access the surfacecontroller.
Thanks, Alex
Hi Alex,
You are a star! works perfectly, so the right way to do it is:
Add a reference from the .Core to the .Web project ( https://www.screencast.com/t/5R4eZBuT4mpa )?
Is it "best practice" to place the models from the Umbraco ModelsBuilder in the .Core project as well?
Hi Henrik,
I prefer to place models in the .Core project, especially if the project is in the active development stage.
When you need to make changes to the existing project I prefer do not change ModelsBuilder mode, so as it's set in the project I just continue the same way
Thanks,
Alex
is working on a reply...