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="me@mydomain.com" from="me@mydomain.com" buffer="false" subjectPrefix="Error: " bodyHeader="This email is generated from my application."/>
    <add name="EmailErrorProvider2" type="System.Web.Management.SimpleMailWebEventProvider" to="me@mydomain.com" from="me@mydomain.com" 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

---------------
4

1 回答 1

1

我的猜测是它正在编译视图。尝试预编译你的视图,看看你是否仍然有同样的问题。

于 2009-11-04T00:11:40.177 回答