Hosting .NET service in IIS (No Interface)
.net, iis, service
Solution
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.
Problem
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?