1

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.

Kev
  • 118,037
  • 53
  • 300
  • 385
saarthak
  • 1,004
  • 2
  • 12
  • 26

1 Answers1

3

Here are some of my observations:

IIS 7:

Pros:

  • Ready made hosting environment inside IIS
  • Will work with pretty much any hosting environment

Cons:

  • HTTP Only
  • Configuration slightly more complex

WAS:

Pros:

  • Ready made and familiar process model to that of IIS
  • No dependency on IIS
  • All protocols supported

Cons:

  • Not all shared hosting environments will support non-http protocol bindings or unusual port numbers.
  • Configuration slightly more complex

Windows Service:

Pros:

  • Starts when windows starts
  • You can start/stop the service via the service control manager
  • All protocols supported

Cons:

  • Some extra steps to deploy/re-deploy (installutil)
  • You need some extra boilerplate code to support the service implementation
  • Not ideal if you can't have access to the server to install (e.g. shared hosting)

Console Application:

Pros:

  • Fast and simple to deploy for testing purposes
  • All protocols supported

Cons:

  • You need to be logged on to start the process
  • Loss of session or machine shutdown will kill the service
  • Console/RDP access required
Kev
  • 118,037
  • 53
  • 300
  • 385
  • Thanks Kev. I will be hosting this service in Win2008 VPS, so access wise I have complete control. Also, i wanted to know if the place where I am hosting (IIS7/WAS/ConsoleApp/WinService) impacts the performance of the service or not.? – saarthak Mar 29 '11 at 04:51
  • @Saarthak - With IIS and WAS there'll possibly be a tiny overhead when the process is created depending on how you tune your idle timeout and recycling policy. But it's small potatoes. – Kev Mar 29 '11 at 08:34