tags:

views:

28

answers:

2

I've written a small application that simply has a timer that polls a database on a tick. When specific entries are found, it does a bit of processing.

Currently this is written in C# and hosted in a Windows Service.

Many of my team's other, more "interactive" services are being moved to being centrally hosted in IIS. For consistency, I was asked to convert my service to be hosted in IIS.

Is it possible to host a service that has no Interface in IIS? I'm used to seeing OnStart and OnStop methods, are those still available when hosted this way?

+2  A: 

Your application is typically something which should be deployed as a windows service.

The only way I see this work in IIS is to have a client program calling the service... but then this should be a windows service as well.

Gerrie Schenck
+3  A: 

Until IIS 7.5, services hosted in IIS are activation-based - that is, they only run when requested. For performance reasons, they stay running for a while after that, but there's no guarantee that they will be running at all.

For a service like yours, IIS hosting doesn't sound like a particularly good idea. If it's never requested, it's never going to run.

Mark Seemann
What will change in this context after 7.5?
Gerrie Schenck
Thanks for the info.
80bower
+1: This would be a bad decision, and the way 80bower originally built the service is the only "right" answer.
Chris Lively