Is the serviceAutoStartProvider attribute required to auto-start an ASP.NET application?

I've been reading Scott Guthrie's post on Auto-Start ASP.NET Applications, which provides examples on how to setup an ASP.NET 4.0 application to auto-start.

<applicationPools>
    <add name="MyAppWorkerProcess" managedRuntimeVersion="v4.0"
        startMode="AlwaysRunning" />
</applicationPools>

<!--...-->
<sites>
     <site name="MySite" id="1">
          <application path="/" serviceAutoStartEnabled="true"
              serviceAutoStartProvider="PreWarmMyCache" />
     </site>
</sites>

<!--...-->
<serviceAutoStartProviders>
     <add name="PreWarmMyCache" type="PreWarmCache, MyAssembly" />
</serviceAutoStartProviders>

What is unclear from his post is if the following configuration will auto-start an ASP.NET application:

<applicationPools>
    <add name="MyAppWorkerProcess" managedRuntimeVersion="v4.0"
        startMode="AlwaysRunning" />
</applicationPools>

<!--...-->
<sites>
     <site name="MySite" id="1">
          <application path="/" serviceAutoStartEnabled="true" />
     </site>
</sites>

The difference here is that there is no class specified to start-up. Ideally the application would just be loaded. The documentation on Application for a Site implies that the serviceAutoStartEnabled attribute requires a serviceAutoStartProvider attribute to work. But there is no indication of what happens if the additional attribute is not provided.

  • Am I reading the documentation correctly?
  • Is a serviceAutoStartProvider required to be specified to utilize serviceAutoStartEnabled?
  • What happens if no serviceAutoStartProvider is specified?

Solution 1:

The Warm-Up functions, specifically those related to IIS were either discontinued or no longer developed against. Scott's article was from pre-VS2010. They re-wrote the entire stack into a new IIS Module.

You can now configure all of this directly from IIS using the Application Initialization Module. The module provides more features and functionality than the warm-up mechanism you are looking into.