Dev
Dev

Reputation: 329

WCF vs WCF hosted in windows service for long running task

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

Answers (2)

Seymour
Seymour

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

Ahmad Al Sayyed
Ahmad Al Sayyed

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

Related Questions