In ELMAH with MVC 3, How can I hide sensitive form data from the error log?
问题 Here is the scenario... User types his username. Types an "incorrect" password. Both username and password values are being passed to the Elmah error log via the Exception.Context.Request.Form["Password"] . It's a read-only value and cannot be modified. And no... I don't want to dismiss the exception (fail). We added ErrorLog Filtering programmatically: void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e) { if (e.Exception is LogOnException) { ((HttpContext) e.Context).Request