Orchard with Web Services

Topics: Core, Customizing Orchard, General, Writing modules
Nov 22, 2012 at 10:09 AM


I am trying to build an orchard module which will export content items xml (among other things) through a web service (optionally WCF). Accessible through URL.

So far I was unable to find a module with those capabilities to copy the general structure from, or a reference/explenation of how to create the general structure for the webservice.

If you could please provide me with a code sample of the general structure or an example of a module already using these features.

Thank you :))

Nov 22, 2012 at 2:40 PM
Edited Nov 22, 2012 at 2:41 PM

Orchard has WebApi built in to the core. All you have to do is create a controller that inherits ApiController and you are good to go :)


Nov 25, 2012 at 8:32 AM
Edited Nov 25, 2012 at 11:41 AM

Thank you :)

Can I implement this without installing webapi.all?


Because when i installed it on the latest version of orchard (1.6) it crashed the whole version -

apparently because webapi doesn't support .net 4.5 which the latest version is built on.


Nov 25, 2012 at 7:03 PM

You don't need 4.5 or WebApi.dll, you just need to use the dlls that are in the lib folder of your Orchard installation.