Freigeben über


Guidance for Hosting and Consuming WCF Services

Here is a great article on how to host and consume WCF Services.  The great thing about this article is that provides prescriptive guidance on where to put the WCF Service once authored.  Based on the establishment of enterprise environments, B2B and B2C or EAI models, the paper promotes a "Why not IIS (7.0)?" philosophy.

As many of you may know, a WCF Service is conceptually similar to breaking a Web Service out of IIS and making access to it nearly ubiquitous.  Essentially, once the service, data and operation contracts and implementation have been built, developers can look at requirements to figure out how to make their service available.  IIS 6.0 and 7.0 are convincing WCF host providers since they already provide start and stop functionality and hosting over http.  IIS 7.0 includes windows activation services (WAS) which equips IIS 7.0 with the ability to service WCF requests on multiple protocols (i.e. TCP, MSMQ).  Both implementations provide state management for requests from clients. 

The paper outlines other choices for hosting.  The only other significant method of hosting might be a Windows Service when you don't want to use IIS (i.e., like in a packaged software server product) or if you need 2 applications on a desktop to talk to each other (self hosting).

https://msdn2.microsoft.com/en-us/library/bb332338.aspx