Elmah and removing sensitive info, server variables from error page

StackOverflow https://stackoverflow.com/questions/16948339

  •  31-05-2022
  •  | 
  •  

Вопрос

In the Elmah error log page it shows server variables. However, while it is nice to have this extra info I'd like to turn this off as it displays authorization tokens which are sensitive. Is there way to configure Elmah to turn this feature off so they aren't displayed?

Это было полезно?

Решение

I think the only way to do this will be to create a custom Log viewer. From the Elmah Project Home Page:

Use ErrorLogDataSourceAdapter together with ObjectDataSource from ASP.NET to create your own custom views of the error log, almost purely in server-side markup and without a line of code!

Also, have you considered just restricting access to viewing the Elmah logs? See Securing Error Log Pages for more details.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top