我無法弄清楚如何讓Elmah在我的Asp.net MVC項目的生產主機上工作。在本地和我的最後一臺主機上,所有設置都正確,併成功打開錯誤記錄器/Elmah.axd
。但是,在生產主機上它給我一個500錯誤代碼。我不知道還有什麼可以調試的問題。我的web.config看起來像:Elmah在生產時給出了錯誤代碼500,但在老主機/本地開發中沒有給出
<configSections>
<sectionGroup name="elmah">
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
</sectionGroup>
</configSections>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
</modules>
<handlers>
<add name="Elmah" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
</handlers>
</system.webServer>
<system.web>
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
</httpModules>
<httpHandlers>
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
</httpHandlers>
</system.web>
<elmah>
<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="MyDbContext" />
</elmah>
哪個版本的IIS是您的本地主機和生產Web服務器? – 2011-04-16 21:39:37
這是IIS7(也許7.5)。不知道如何找到我的虛擬主機的更詳細的(和我的遠程登錄功能目前失敗) – KallDrexx 2011-04-16 22:09:09