1

I need to send push notification every day based upon date-time stored in database. For that I want to call a WCF service but my problem is that this WCF service should be called automatically every day without any interaction.

How to call a WCF service automatically?

If any other idea to accomplish this task please provide.

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
user2042214
  • 165
  • 9
  • Take a look at http://stackoverflow.com/questions/789852/wcf-windows-service-as-scheduled-service – JayL May 18 '13 at 17:40

1 Answers1

1

You can accomplish this kind of a task with ease using the Windows Service. In the windows service, you will add a reference to the Web Service and then create a client and invoke the service.

The windows service will also have access to the database for choosing the data for its tasks. Also, you can configure the windows service to have a timer that performs the tasks at certain intervals.

Saravanan
  • 7,637
  • 5
  • 41
  • 72
  • @saravanan- thanks . But my hosting sever have only .Net framework , there is not dev environment. so is there any problem relating to giving reference wcf service to windows service. can you provide code ? – user2042214 May 18 '13 at 18:23
  • There is no requirement for a Dev environment, you have to just build the windows service and then install it in the server. Please check this link: http://a1ashiish-csharp.blogspot.com/2012/02/cnet-how-to-consume-wcf-service-hosted.html – Saravanan May 18 '13 at 18:29
  • thanks, and how to make windows service call wcf service automatically in particular interval of time – user2042214 May 18 '13 at 18:38
  • @user2042214: Please take a look at : http://stackoverflow.com/questions/5495842/use-of-timer-in-windows-service. This post is more elaborate on the discussion on various timers and how to use them. – Saravanan May 19 '13 at 08:16