Last post May 13, 2013 08:50 AM by adamturner34
May 13, 2013 08:09 AM|BitShift|LINK
So I was working through some sample projects to learn Workflow 4 and one was a WCF Workflow service. One project I have coming up will involve creating a new windows service and I will also need to use workflow. I was thinking this might be the way to
go - have a wcf workflow service exposed through my windows service. However, all I really need is to be able to execute one or more workflows from within the windows service. Any application can execute a workflow, so if this is a new project, I dont see
the need to have a wcf service.
Just build the windows service and add the workflows and call them from within the service.
Under what scenario would you want to build a wcf service to be hosted inside a windows service?
May 13, 2013 08:16 AM|adamturner34|LINK
In no scenario would you want to do that and I'm doubting it's even possible.
A windows service is buried deep in the OS in a layer that doesn't have access to outside resources or allow resources to get in. It's a self contained service by design.
I'd suggest simply using the WCF as it's designed and forget about the windows service altogether.
May 13, 2013 08:37 AM|BitShift|LINK
Well, the main reason I ask is after coming across this example
After seeing that, I was left wondering what the benefit would be?
As I began figuring out what the best solution for my needs were, at first I thought about a WCF service, but in the end I went with a windows service to handle the tasks of runnin gon a schedule. Another part of the process might be using a WCF service,
but regardless I just couldnt see using WCF embeded in a windows service like in the above example.
Yes, I agree WCF is probably best left to the role it was intended - a flexible service framework to handle requests.
May 13, 2013 08:50 AM|adamturner34|LINK
Ah, I need to get with times.
The benefit is a self-hosting windows/wcf service with a listener to communicate the outside world. In the dark days befor wcf, we used named pipes and .net remoting to accomplish the same thing but were limited to the technologies and protocols. So a bigger
benefit of this approach is the biggest benefit of wcf in that it allows communication between many different technolgies.