It is indeed possible to do what you describe- I am currently working on an application that uses the Asp.Net Auto-start feature to have a worker thread behaving like a windows service but hosted inside IIS so you keep all your code in one place.
It is very handy and after the somewhat fiddly configuration it seems to work more or less as advertised although running a service in IIS rather than as a Windows service does have a slight impact on reliability in my ( non scientifically validated ) opinion. Certainly a useful tool, however and something that will only get better as it becomes more popular.
Edit: After a couple more months of using this configuration, it becomes clear that it will sometimes behave in slightly curious ways - for example starting multiple instances of the same thread - and it can generally be a little quirky. It also isn't necessarily any easier to troubleshoot than a regular windows service, although it probably is easier to deploy. On the application I am working with, we are looking at moving our long-running services from IIS to Windows Services.