场景
我试图在我的ASP.Net应用程序中实现自动启动/保持活动/预加载信息。指示非常明确:ASP.Net + IIS 7.5 - 预加载和自动启动,但我在IIS 7.5 Express中无法做到这一点。我遇到了一些关于配置元素的500.19错误。下面是上下文和问题:
ApplicationHost.config
<!-- Inside the ApplicationPools element we tell the appropriate app pool
to auto start and always run. -->
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" startMode="AlwaysRunning" />
<!-- In the Sites element we first ensure our application is using the correct
app pool. Then we tell it to use the pools auto start functionality, and
point it towards a provider to use. -->
<site name="ED.Web" id="11">
<application path="/" applicationPool="Clr4IntegratedAppPool" serviceAutoStartEnabled="true" serviceAutoStartProvider="Preload-UserReconciliation">
<!-- everything is properly closed -->
<!-- Just before closing the Sites element we declare a provider; it identifies
the class within a particular assembly that should be used for preloading -->
<serviceautostartproviders>
<add name="Preload-UserReconciliation" type="ED.Web.ApplicationPreload, ED.Web" />
</serviceautostartproviders>
</sites>
错误1
错误500.19,未识别的元素'serviceautostartproviders'
239: <serviceautostartproviders>
240: <add name="Preload-UserReconciliation" type="ED.Web.ApplicationPreload, ED.Web" />
错误 2 [编辑]
在完全关闭IIS Express后,再次从VS启动应用程序时,会弹出一个Visual Studio弹窗:"无法启动IIS Express Web服务器。"
问题
我如何正确设置IIS Express 7.5以启动池,并使用我的ApplicationPreload:IProcessHostPreloadClient
类预加载应用程序?