.Net MVC 应用程序不断编译 - 我如何找出原因?

发布于 2024-08-10 02:35:34 字数 2605 浏览 1 评论 0原文

我正在网站上使用运行状况监控,它似乎每分钟左右甚至更频繁地重新编译。不过,我并不总是丢失会话状态。

这是我的 web.config 中的健康监控代码

    <healthMonitoring enabled="true">
        <eventMappings>
            <clear/>
            <add name="All Errors" type="System.Web.Management.WebBaseErrorEvent, System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" endEventCode="2147483647"/>
    <add name="Application Events" type="System.Web.Management.WebApplicationLifetimeEvent" startEventCode="0" endEventCode="2147483647"/>
        </eventMappings>
        <providers>
            <clear/>
            <add name="EmailErrorProvider" type="System.Web.Management.SimpleMailWebEventProvider" to="[email protected]" from="[email protected]" buffer="false" subjectPrefix="Error: " bodyHeader="This email is generated from my application."/>
    <add name="EmailErrorProvider2" type="System.Web.Management.SimpleMailWebEventProvider" to="[email protected]" from="[email protected]" buffer="false" subjectPrefix="App Start / App End: " bodyHeader="This email is generated from my application."/>
        </providers>
        <rules>
            <clear/>
            <add name="Testing Mail Event Providers" eventName="All Errors" provider="EmailErrorProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom=""/>
    <add name="Application Events Default" eventName="Application Events" provider="EmailErrorProvider2" profile="Default" minInstances="1"             maxLimit="Infinite" minInterval="00:00:00" />
        </rules>
    </healthMonitoring>

这是一个通知:

    ** Events **
---------------
Event code: 1003
Event message: Application compilation is starting.
Event time: 11/3/2009 6:46:54 PM
Event time (UTC): 11/3/2009 11:46:54 PM
Event ID: dd8d7deee3c048b1bef67b77aa6849bc Event sequence: 3 Event occurrence: 2 Event detail code: 0

Process information:
    Process ID: 6632
    Process name: devenv.exe
    Account name: Max-Acer\Max

---------------

I am using health monitoring on a site and it seems to recompile every minute or so or even more often. I do not always lose session state though.

Here is my Health Monitoring code from my web.config

    <healthMonitoring enabled="true">
        <eventMappings>
            <clear/>
            <add name="All Errors" type="System.Web.Management.WebBaseErrorEvent, System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" endEventCode="2147483647"/>
    <add name="Application Events" type="System.Web.Management.WebApplicationLifetimeEvent" startEventCode="0" endEventCode="2147483647"/>
        </eventMappings>
        <providers>
            <clear/>
            <add name="EmailErrorProvider" type="System.Web.Management.SimpleMailWebEventProvider" to="[email protected]" from="[email protected]" buffer="false" subjectPrefix="Error: " bodyHeader="This email is generated from my application."/>
    <add name="EmailErrorProvider2" type="System.Web.Management.SimpleMailWebEventProvider" to="[email protected]" from="[email protected]" buffer="false" subjectPrefix="App Start / App End: " bodyHeader="This email is generated from my application."/>
        </providers>
        <rules>
            <clear/>
            <add name="Testing Mail Event Providers" eventName="All Errors" provider="EmailErrorProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom=""/>
    <add name="Application Events Default" eventName="Application Events" provider="EmailErrorProvider2" profile="Default" minInstances="1"             maxLimit="Infinite" minInterval="00:00:00" />
        </rules>
    </healthMonitoring>

Here is a notification:

    ** Events **
---------------
Event code: 1003
Event message: Application compilation is starting.
Event time: 11/3/2009 6:46:54 PM
Event time (UTC): 11/3/2009 11:46:54 PM
Event ID: dd8d7deee3c048b1bef67b77aa6849bc Event sequence: 3 Event occurrence: 2 Event detail code: 0

Process information:
    Process ID: 6632
    Process name: devenv.exe
    Account name: Max-Acer\Max

---------------

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

攒眉千度 2024-08-17 02:35:34

我的猜测是它正在编译视图。尝试预编译您的视图,看看您是否仍然遇到相同的问题。

My guess would be that it's compiling views. Try pre-compiling your views and see if you still have the same problems.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文