Elmah: How do I log form post data?

This was also addressed in the ELMAH discussion group, quoted below verbatim:

ELMAH actually does log all the form
data. It is not displayed alongside
server variables by default when you
look at the error detail page but can
be dug out of the raw XML view from
the very same page. The form data,
however, is also not included in
e-mails.

The real reason for leaving out the
display of form data was to avoid
bloat and noise from a lot of ASP.NET
applications with very large view
states (hundreds of KB). Also, some
forms include lots of HTML in textarea
fields (especially CMS systems) that
could also lead to large amounts of
noise. In the absence of a single good
solution that fit all sizes, the
problem has been left as being outside
the scope of ELMAH (though still open
for discussion). If someone needs to
display FORM data, a custom error
detail page is very quick to code up.

Leave a Comment