2009-11-03 36 views
0

我在網站上使用健康監控,似乎每分鐘或更頻繁地重新編譯。但我並不總是會失去會話狀態。.Net MVC應用程序不斷編譯 - 我如何找出原因?

這裏是我的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 

--------------- 
+0

您的文件和計算機日期的時間戳是否正確?檢查您沒有帶有「未來」時間戳的文件。 – pgb 2009-11-04 00:03:22

回答

1

我的猜測是,它的編譯意見。試試pre-compiling your views,看看你是否仍然有同樣的問題。

+0

這是有道理的,我只是閱讀了一篇關於編譯.aspx頁面的博客文章,並且剛剛回來在這裏添加了這篇文章 - http://tinyurl.com/wf6p6 – Slee 2009-11-04 00:47:51

相關問題