3

设想

我正在尝试在我的 ASP.Net 应用程序中自动启动/保持活动/预加载信息。说明简单明了:ASP.Net + IIS 7.5 - Preloading & Auto Starting,但我在 IIS 7.5 Express 中这样做时遇到问题。我收到有关某些配置元素的 500.19 错误。以下是上下文和问题:

应用程序主机配置

<!-- 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 弹出窗口:"Unable to launch the IIS Express Web server."

问题

如何正确设置 IIS Express 7.5 以启动池,并使用我的ApplicationPreload : IProcessHostPreloadClient类预加载应用程序?

4

1 回答 1

1

尴尬...

http://www.iis.net/download/ApplicationInitialization

我完全错过了这是 IIS 7.5 的带外模块,而不是基本功能。

它包含在从 IIS 8.0 开始的基本功能中。

我在上面找到的带有此信息的原始帖子并没有指出这一点,当我使用有问题的链接时,我完全轻而易举地看到了仅查看代码的亮黄色框。

于 2012-07-17T19:39:37.627 回答