Benjamin Tinker Team : Web Development Tags : Web Development

Integrating your .Net Console Application with Umbraco

Benjamin Tinker Team : Web Development Tags : Web Development

One of the more common issues that comes up with Umbraco is how to access its data store and methods from an external source. This comes up when you have to build a console application or scheduled task that needs to perform system functions but have full access to Umbraco library. One way you could do this is try to remember all the .dll libraries and configurations necessary for the console application to access Umbraco, or you could use Umbracos Web Services instead.

It's really that easy. Umbraco already has built into to a bunch of Web Services that you hook into. To do so you simply load up Visual Studio and find the Solution or Application you would like to use the the service on use the Add Service Reference tool. Enter the URL of you local Umbraco instance and hit the Discover button. This presents you with some pre-built web services you can use built by Umbraco. 

If you need to make something a bit more custom you can do so by adding a Web Service to the Services folder of you current project. From there you can build the Web Service to do whatever tasks you require and have them all leverage against the Umbraco library. Be sure to check for a Username and Password on all your Web Methods as these services are public. Once your done and its all tested you can then reference the new service from your outside application without worrying about .dll libraries or other includes. Just call the new Web Service and have all the work done at the Umbraco end while your application takes 5 and waits for the response.

Happy Coding.