Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
Hi All,

i want to create WCF service in which i have two method one method i want that automatically(continuously like schedular) running and get data from xml files, and second method i want that could be manually call by some website,means if some website ask for some data it can call manual method,but other method keep running, how can i Create such type of WCF service and how to deploy that.

or Suggest me the best way to do that,,means one method keep running and other method would be manually call by any website

Thanks i advance
Posted
Comments
Sergey Alexandrovich Kryukov 22-Aug-14 2:49am    
Not clear. What triggers the change in those XML files?
—SA

The idea sounds really bad. This is called pull technology or polling, very inefficient and non-responsive at the same time. You really need to get to making proper architecture. Apparently, if XML has changed, something triggers it. This event should be used to notify the WCF service. This way, the service would play its natural role and won't do unnatural polling.

See also:
http://en.wikipedia.org/wiki/Pull_technology[^],
http://en.wikipedia.org/wiki/Push_technology[^].

See also my past answer: Application 'dashboard' for website accounts[^].

If you provide adequate level of detail, perhaps I could provide mode detailed advice.

—SA
 
Share this answer
 
Comments
Member 11028741 22-Aug-14 4:16am    
i have two method one method i want that automatically(continuously like schedular) running and get data from xml files, and second method i want that could be manually call by some website,means if some website ask for some data it can call manual method,but other method keep running,

Suggest me the best way to do that,,means one method keep running and other method would be manually call by any website
Thanks i advance
Sergey Alexandrovich Kryukov 22-Aug-14 11:25am    
I've already done that. No, I'm not talking about "one method keep running"? Who told you that you need that. You need to process the changes in XML. Do exactly that.
—SA
using WCF the way you mentioned is indeed bad. SA is correct. One approach to address your issue could be like :
* Build a separate application (either windows service or console application triggered via Batch file) which will read XML files and update Database.
* Build a WCF Service (Manual Method) which read the database and serve other website requests to your WCF Service.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900