0

ELMAH works fine in my website running on VS & IIS, but after creating a docker image for the app, XML errorLog doesn't work - actually there is NO xml file created. My code raises exceptions but I see nothing when navigating to http://xyz/elmah.

If changing to use in memory logging, that still works fine.

Any help or advice is much appriciated.

Web.config file is as below:

    <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>
hazjack
  • 1,645
  • 13
  • 27

1 Answers1

0

I fixed the issue by:

  • Add a volume for the container like C:\Logs
  • And update the config file to put xml error logs to the volume folder C:\Logs

There might have permission issue on writing files to ~/App_Data

hazjack
  • 1,645
  • 13
  • 27