locked
What is Service host? How different is it when deploying your service in IIS? RRS feed

  • Question

  • Hi

    Can some one explain

    1. What is a service host?
    2. When should you create Service host?
    3. Does IIS takes care of the Service host when hosted in IIS.

    Thanks,
    Chocks

    Wednesday, January 25, 2012 7:29 PM

Answers

  • 1. A ServiceHost is the runtime of your service. It exposes the endpoints, creates the channel stack... A service without a ServiceHost cannot be called.

    2. You always need a ServiceHost. This does not meen that you always need to develop one. These are valid hosts for WCF service: self-hosting (console app, windows app, windows service), IIS/WAS, Windows AppFabric, BizTalk Server... Only if you self-host you need to develop the host.

    3. Yes. Take a look at the content of the '.svc' file when you host in IIS. It tells IIS what ServiceFactory to use when creating the ServiceHost.


    If this post answers your quenstion, please mark it as such. If this post is helpful, click 'Vote as helpful'.
    • Proposed as answer by Peter Borremans Thursday, January 26, 2012 6:14 PM
    • Marked as answer by Yi-Lun Luo Wednesday, February 1, 2012 11:42 AM
    Wednesday, January 25, 2012 9:41 PM