Reputation: 329
What is the difference in using WCF with netTcpBinding
for long running task, which is hosted in IIS vs self-hosted in a managed windows service for LONG RUNNING TASK?
Upvotes: 2
Views: 1289
Reputation: 7067
I think there are pros and cons associated with hosting WCF services in either IIS or a self-hosted managed service. The technical details and opinions surrounding the hosting decision are discussed/debated fairly thoroughly in this thread:
IIS WCF service hosting vs Windows Service
Our team almost always uses self-hosting in managed Windows services, so my thinking aligns with the answer provided by marc_s (10/13/09).
As the following article seems to confirm, I think hosting long running “tasks” in a self-hosted managed service is sound design choice.
http://msdn.microsoft.com/en-us/library/ms730158.aspx
Regards,
Upvotes: 3
Reputation: 596
Hosting WCF Service in IIS has benefits such as managing service lifetime (Activation, Recycling,...) so you don't have to worry (or write custom code to do this), IIS also activates the service on demand so your resources are used when needed
Upvotes: 1