locked
How to host a netTcp WCF service? RRS feed

  • Question

  • I have a nettcp service which I have to host. I have three options -
    1. IIS 7

    2. Windows Service

    3. A console application

    I would be grateful if anybody could give some valuable thoughts on which option is better vis-a-vis other one.

    And how does the performance of the WCF service vary depending on the hosting option that I choose.

     

    Thanks

    Tuesday, March 29, 2011 5:28 AM

Answers

  • Hello,

    Reliable:

    • if your console applications crashes your service is offline.
    • Your console applications has the credentials of the logged on user. With IIS or a Windows Service you can choose the user account
    • No user needs to be logged in with IIS or a Windows Service.
    • ...

    Regards,
    Pieter

    • Proposed as answer by Pieter De Rycke Thursday, March 31, 2011 7:15 AM
    • Marked as answer by Yi-Lun Luo Monday, April 4, 2011 9:09 AM
    Tuesday, March 29, 2011 10:09 AM

All replies

  • Hello,

    I recommend that you choose IIS7 (or WAS in fact for netTCP) as its the most reliable. It supports automatic service starting and process recycling. And you can use the IIS tools to monitor and configure the service. Next I would opt for a Windows Service. I do not recommend that you host a service in a console application as this type of hosting is in my opinion unreliable.

    Regards,
    Pieter

    Tuesday, March 29, 2011 5:45 AM
  • Hi Pieter,

    Thanks for sharing your thoughts. Can you explain what you mean by 'reliable'? What makes the hosting environment as reliable or unreliable?

     

    Thanks

    Tuesday, March 29, 2011 6:44 AM
  • Hello,

    Reliable:

    • if your console applications crashes your service is offline.
    • Your console applications has the credentials of the logged on user. With IIS or a Windows Service you can choose the user account
    • No user needs to be logged in with IIS or a Windows Service.
    • ...

    Regards,
    Pieter

    • Proposed as answer by Pieter De Rycke Thursday, March 31, 2011 7:15 AM
    • Marked as answer by Yi-Lun Luo Monday, April 4, 2011 9:09 AM
    Tuesday, March 29, 2011 10:09 AM