【问题标题】:Using ASP.Net Preloader in IIS 7.5 Express在 IIS 7.5 Express 中使用 ASP.Net Preloader
【发布时间】:2012-07-16 18:26:51
【问题描述】:

场景

我正在尝试在我的 ASP.Net 应用程序中自动启动/保持活动/预加载信息。说明简单明了:ASP.Net + IIS 7.5 - Preloading & Auto Starting,但我在 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 弹出窗口:"Unable to launch the IIS Express Web server."

问题

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

【问题讨论】:

  • 在您的 sn-p.. 中看不到开头的 标记?远射,可能,但有时是简单的事情...... :) 实际上,整个 块不属于 before 部分吗?看起来它们可能嵌套在您的示例中..
  • 感谢您的回复。 cmets 解释了这些特定元素的放置位置。 XML 结构是 100% 好的(至少它符合 ASP.Net 上的说明):)
  • 足够好了..只是从那里看两个分开的样本,并在您的 sn-p 中看到嵌套的样本...
  • 检查答案。我活该被程序员修女骂。
  • LOL 很容易被忽视。我自己也没注意到:)

标签: asp.net .net-4.0 iis-7.5 asp.net-4.0 iis-express


【解决方案1】:

尴尬……

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

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

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

我找到的带有此信息的原始帖子并没有指出这一点,当我使用有问题的链接时,我只看代码就完全摆脱了明亮的黄色框。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-30
    • 1970-01-01
    相关资源
    最近更新 更多