【发布时间】:2020-12-05 16:00:55
【问题描述】:
ELMAH 在我在 VS 和 IIS 上运行的网站上运行良好,但在为应用程序创建 docker 映像后,XML errorLog 不起作用 - 实际上没有创建任何 xml 文件。我的代码引发异常,但导航到 http://xyz/elmah 时我什么也看不到。
如果更改为在内存日志记录中使用,那仍然可以正常工作。
非常感谢任何帮助或建议。
Web.config 文件如下:
<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>
<elmah>
<security allowRemoteAccess="yes" />
<errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
</elmah>
【问题讨论】:
-
出现异常,但问题中缺少信息。
-
@Luuk 你认为我应该粘贴什么信息? xml配置?这很简单: