It is answered over here on MSDN, the one from SilverNinja is a better answer.
I found that the IIS UI is not that great for configuring applications
- especially when trying to setup the Site Root as an autostart application. The best way to manage it is by using the Configuration
Editor that comes with AppFabric under the
Computer Name ->
Management of Features View.
To make a Site Root an autostart application - you need to locate the
system.applicationHost/sites and click the (Collection)
entry. Click on your site name in the list of sites and click
(Collection) once more. Select the application in the list and assign
serviceAutoStartProvider="Service". Also enter net.pipe for the
enabledProtocols ("http, net.pipe").
You also need to change the application pool setting to
AlwaysRunning. To locate this setting, use the Collection Editor to
navigate to the Section
Click the (Collection) value and then select the application pool used
by your root site and assign
At this point, you can script your changes via "Generate Script" or
apply them immediately using the "Apply" action. Hopefully this helps
someone else who was as confused as I was about the issue. To test the
configuration, you can issue an
iisreset to see if your
process starts immediately.
Autostart Configuration MSDN Reference