locked
IIS or Windows Service hosting for file service? RRS feed

  • Question

  • Hi,

    I'm designing a set of WCF services tasked with downloading and uploading some files from and to SFTP sites, performing basic processing and exchanging data with database. Each of those services exposes at most three operations that can take up to 20 minutes to complete. Which WCF hosting model is preferable - IIS 7.0 or from within Windows Service? Or perhaps should I look in entirely different direction (pure WS?)?

    Additional requirements:

    1. must be schedulable with possibility of manual activation via service call
    2. relatively stable - interrupts could corrupt imported data
    3. ease of deployment, maintenance and extensibility

    All input is appreciated.


    • Edited by Radek Nocon Thursday, August 2, 2012 1:33 PM
    Thursday, August 2, 2012 1:33 PM

Answers

  • Deploying the service to IIS is bar far the easiest option, and should be fine. HTTP obviously supports downloads that can last several hours or days, so that transport protocol should be fine. IIS is stable these days, but can be crashed or interrupted due to other failing services. A Windows service in that regards is isolated, so if another service fails, it will still run. IIS is also easier to maintain however, you don't actually have to do any service registration, just upload into a virtual application and access it.


    Currently developing FaultTrack. I occassionally blog about C# and .NET.
    Hoping to become a MVP by 2013. Email: danderson [at] dcomproductions [dot] com

    • Marked as answer by LeoTang Sunday, August 12, 2012 11:17 AM
    Thursday, August 2, 2012 6:37 PM
  • It is easier to deploy a WCF service on IIS than deploying it as a Windows service. Other options are using WAS or a simple console application as a host.

    Actually you can try all of the options and see which one suits you best. It is easy to write a host app of any type once you have the WCF service built.

    • Marked as answer by LeoTang Sunday, August 12, 2012 11:18 AM
    Friday, August 3, 2012 2:10 PM
  • Before I suggest the deployment option,

    I suggest to implement a window service to

    1. Download and upload files from SFTP sites (Ideally avoid implementing long running and time consuming tasks in WCF solutions)

    2. It can be scheduled so ideal project type is a windows service, easy to deploy, maintain and extend

    Or if you are going for a WCF implementation to perform all the tasks you mentioned, then IIS is definitely the best bet - purely more reliable, performance and various reasons!

    I hope this would help!

    • Marked as answer by LeoTang Sunday, August 12, 2012 11:17 AM
    Friday, August 3, 2012 3:18 PM

All replies

  • Deploying the service to IIS is bar far the easiest option, and should be fine. HTTP obviously supports downloads that can last several hours or days, so that transport protocol should be fine. IIS is stable these days, but can be crashed or interrupted due to other failing services. A Windows service in that regards is isolated, so if another service fails, it will still run. IIS is also easier to maintain however, you don't actually have to do any service registration, just upload into a virtual application and access it.


    Currently developing FaultTrack. I occassionally blog about C# and .NET.
    Hoping to become a MVP by 2013. Email: danderson [at] dcomproductions [dot] com

    • Marked as answer by LeoTang Sunday, August 12, 2012 11:17 AM
    Thursday, August 2, 2012 6:37 PM
  • It is easier to deploy a WCF service on IIS than deploying it as a Windows service. Other options are using WAS or a simple console application as a host.

    Actually you can try all of the options and see which one suits you best. It is easy to write a host app of any type once you have the WCF service built.

    • Marked as answer by LeoTang Sunday, August 12, 2012 11:18 AM
    Friday, August 3, 2012 2:10 PM
  • Before I suggest the deployment option,

    I suggest to implement a window service to

    1. Download and upload files from SFTP sites (Ideally avoid implementing long running and time consuming tasks in WCF solutions)

    2. It can be scheduled so ideal project type is a windows service, easy to deploy, maintain and extend

    Or if you are going for a WCF implementation to perform all the tasks you mentioned, then IIS is definitely the best bet - purely more reliable, performance and various reasons!

    I hope this would help!

    • Marked as answer by LeoTang Sunday, August 12, 2012 11:17 AM
    Friday, August 3, 2012 3:18 PM