Question

We're using ELMAH for error logging in our ASP.NET application. We use the SQL Server error logging. Because of security and configuration constraints in the application, we would like to have the log viewer UI (Elmah.ErrorLogPageFactory) in a separate web application, connected to the same database.

However, ELMAH filters errors on application name, so just deploying a separate application, you also get a separate log. Is there a way to configure ELMAH to work as a standalone log viewer, i.e. display the log messages from a different application?

Was it helpful?

Solution

You can override the application name in the config like this...

<elmah>
  <errorLog type="..." applicationName="YourApplicationName" />
</elmah>

You could either just give your viewer application the existing name of the application that you want to monitor, or specify the same custom name in both config files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top