11

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?

1 Answer 1

10

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.

2
  • Off to play with this the Application Initialization Module, but I imagine I'll be marking this as the accepted answer soon. Thanks for replying, I hate when questions languish, figured I was going to earn the Tumbleweed badge on this one! ;)
    – ahsteele
    Aug 13, 2012 at 19:49
  • @ahsteele Ha, eventually people troll through the old questions. Just takes some time every once in a while. Hope it fill the void for you. Aug 13, 2012 at 20:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .