Retrieving data from background task RRS feed

  • Question

  • Hi All

    I need to build a small demonstrator app that will have a timed background task that retrieves records from a SQL Server database and actively notify the user (toast/live tile/lock screen).

    To pre-empt comments - I know this should be done via push notification, but, for various reasons the 'customer' wishes to avoid the backend infrastructure required.

    I was hoping to be able to read records from the SQL Server database in the background task, write them to a local file and send the notification, but I can't find a way to call SQL Server from Windows Store Apps?

    I then figured I'd bite the bullet and write a simple WCF service that gets the data and call that from the background task, but having added a service reference I get an error when building -

    error CS0426: The type name 'ServiceReference1' does not exist in the type 'ActionNotificationBackgroundTask.ActionNotificationBackgroundTask'

    Adding a reference to the same service from the main windows app project works ok

    Any thoughts on the above? any other way to approach this that does not involve push notifications? is REST the way to go?


    Yossi Dahan - http://yossidahan.wordpress.com - [To help others please mark replies as answers if you found them helpful]

    Friday, August 8, 2014 10:16 AM