Click here to Skip to main content
15,887,392 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hi guyz,

here's my problem,

i created a wcf service that receives and sends queue, i tested it and it doing well,

now what i want is, to create a window service, and when i start the window service it can run my wcf automatically to do it's task.

what i mean is, is it possible that the windows service can consume my wcf, so in that case, when i start the windows service it will run or do the job of my wcf.. thanks

please help.. thanks :)
Posted
Updated 23-Nov-11 20:27pm
v2

Hi,
You can refer this article for detailed solution.
http://www.dotnetfunda.com/articles/article777-wcf-hosting-in-windows-services-.aspx
And please let me know in case you face any problem.
 
Share this answer
 
If you are using MSMQ, then WCF can work as a listner to MSMQ messages using netMSMQBinding without any support of any other mechanism like Windows Service etc.

Have a look at below links for more information on netMSMQBinding.

http://msdn.microsoft.com/en-us/library/ms789048.aspx

http://msdn.microsoft.com/en-us/library/system.servicemodel.netmsmqbinding.aspx

http://blogs.msdn.com/b/motleyqueue/archive/2009/05/31/msmq-and-wcf-getting-started.aspx

Below link for "Hosting of WCF in Windows Service".
http://msdn.microsoft.com/en-us/library/ms733069.aspx
 
Share this answer
 
Hi,

Please find following two msdn links. it was helpful to me for doing the same.

http://msdn.microsoft.com/en-us/library/bb332338.aspx[^]


http://msdn.microsoft.com/en-us/library/ms733069.aspx#Y408[^]
 
Share this answer
 
Thank for the reply guyz, but i got the idea..

on the On_start event of the windows service, i call my wcf method and it works exactly what i want..:)

thanks for the help.. cheers
 
Share this answer
 
v2

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