Hosting of WCF Service
Hosting of WCF Service
- WCF service cannot exist in Void.
- Every WCF service must be hosted in a Windows process called the Host process.
IIS Hosting
- Main advantage of hosting a service in IIS is Host process is launched automatically upon the first client request.
- Disadvantage is that only HTTP protocol could be used.
- Another disadvantage is all the service will run on the same port.
- Here Host Process life cycle is managed by the IIS.
Self Hosting
- This requires adding a managed code to host the process.
- The code could be either a Windows form application or Console application.
- Here host process must be running before client makes a call to the service.
- Mainly Console applications are used for the purpose of self hosting.
- The Console/Windows application must specifically create and open an instance of ServiceHost object.
- The ServiceHost then remains open and available until it is no longer needed.
- Configuration about the Service is being kept in the App.Config file.
No comments:
Post a Comment