Advantages of Hosting WCF service in iis:
- No custom code is required to host the service
- The servicehost directive in .svc file is responsible for creating an instance of Service host when required, so no need to write custom code for hosting
- Automatic message based activation
- We need not start/stop the service manually.iis provides message based activation.The service can be activated when a message arrives at the service, so it should not run all the time like self hosting
- Automatic process recycling:
- iis provides the capability for automatic process recycling if the process takes long time to serve the request. This is not there in self hosting.
Disadvantages of Hosting WCF service in iis:
- Hosting wcf service in iis6.0 is limited to HTTP communication only.
© 2015, admin. All rights reserved.
Reference books, you may like:Programming WCF Services: Design and Build Maintainable Service-Oriented Systems
WCF Multi-Layer Services Development with Entity Framework, 4th Edition
Learning WCF: A Hands-on Guide