1.

Write different ways of hosting a WCF service.

Answer»

The FOLLOWING are the DIFFERENT methods of hosting WCF services:

  • Self-Hosting: It refers to hosting a WCF SERVICE within a managed application. The LIFECYCLE of Host processes is always managed by developers. In order to implement self-hosting, we must include the System.Service.Model.ServiceHost namespace. 
  • Windows Services Hosting: It refers to hosting a WCF service within Windows service. WCF Service lifecycle can be controlled by Service Control Manager. It can, however, be hosted on any version of Windows. 
  • IIS (Internet Information Service Hosting):  Hosting our service under IIS allows us to use all of its features, such as process recycling, ideal shutdown, etc. HTTP transport is the only MECHANISM supported by IIS-hosted services. 
  • WAS (Windows Activation Service Hosting): It is a generalization of IIS features that supports transport protocols other than HTTP. Through the listener adapter interface, WCF communicates activation requests received over non-HTTP protocols supported by WCF, like TCP, named pipes, and Message Queuing. 


Discussion

No Comment Found