1
自动启动ASP.NET应用程序是否需要serviceAutoStartProvider属性?
我一直在阅读Scott Guthrie在“自动启动ASP.NET应用程序”上的帖子,其中提供了有关如何设置ASP.NET 4.0应用程序以自动启动的示例。 <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> 从他的帖子中不清楚的是,以下配置是否将自动启动ASP.NET应用程序: <applicationPools> <add name="MyAppWorkerProcess" managedRuntimeVersion="v4.0" startMode="AlwaysRunning" /> </applicationPools> <!--...--> <sites> <site name="MySite" id="1"> <application path="/" serviceAutoStartEnabled="true" /> </site> </sites> 此处的区别在于,没有指定要启动的类。理想情况下,将仅加载应用程序。有关网站申请的文档暗示该serviceAutoStartEnabled属性需要一个serviceAutoStartProvider属性才能工作。但是,如果没有提供附加属性,则没有任何指示。 …