Tuesday, September 20, 2011

IIS and Self Hosting of WCF Service

Hosting of WCF Service

Hosting of WCF Service

  1. WCF service cannot exist in Void.
  2. Every WCF service must be hosted in a Windows process called the Host process.

IIS Hosting

  1. Main advantage of hosting a service in IIS is Host process is launched automatically upon the first client request.
  2. Disadvantage is that only HTTP protocol could be used.
  3. Another disadvantage is all the service will run on the same port.
  4. Here Host Process life cycle is managed by the IIS.

Self Hosting

  1. This requires adding a managed code to host the process.
  2. The code could be either a Windows form application or Console application.
  3. Here host process must be running before client makes a call to the service.
  4. Mainly Console applications are used for the purpose of self hosting.
  5. The Console/Windows application must specifically create and open an instance of ServiceHost object.
  6. The ServiceHost then remains open and available until it is no longer needed.
  7. Configuration about the Service is being kept in the App.Config file.
November 18th,

No comments:

Post a Comment