Hi, I have been trying to work with creating a webapi controller in a project separate to the main Umbraco project.
Does anyone know of any information or tutorials on doing this in umb9? I have tried including the libraries from umbraco.cms.core but it doesn't seem to be working.
Yeah I always use nuget packages, the controller I wanted in my project was so I could just package it all up into a nuget package to use internally without having to create a controller every time.
Otherwise I guess I would have to create the dll then create an umbraco package that can include the controller/plugin.
Is there a way of using the CropUrl function in a separate project? I don't want to bother with the individual settings, but grab the entire cropped image url with the crop data to supply the api.
WebAPI Controllers in separate project
Hi, I have been trying to work with creating a webapi controller in a project separate to the main Umbraco project.
Does anyone know of any information or tutorials on doing this in umb9? I have tried including the libraries from umbraco.cms.core but it doesn't seem to be working.
Hi Damien,
There should not be any need to do this - just create the controller in your webproject.
Depending on what issues you are facing, you may need other references. In your project file, you should have the following reference:
If the api is for backoffice, you may also need
Adding the libraries, should be done through packages (as per above) to ensure all dependencies are fulfilled.
HTH :)
Yeah I always use nuget packages, the controller I wanted in my project was so I could just package it all up into a nuget package to use internally without having to create a controller every time.
Otherwise I guess I would have to create the dll then create an umbraco package that can include the controller/plugin.
Is there a way of using the CropUrl function in a separate project? I don't want to bother with the individual settings, but grab the entire cropped image url with the crop data to supply the api.
is working on a reply...