views:

35

answers:

1

Hello!

Is there a way to log the post request data in ELMAH?

I am getting error emails, and while the error log contains the URL, request method, etc, I am not seeing the actual POST data.

For example,

Here is a sample Actual request: /bep/KotexCode/GetCode?stickerCode=1234532

But, the log only shows the request url and not the variable stickerCode. Thanks!

Edit Sorry, I should have checked the project website, but it looks like this feature was requested. http://code.google.com/p/elmah/issues/detail?id=164

+2  A: 

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.

Atif Aziz
Thank you! At least I can look at the error log XML files to see what's going on.
AbeP
Cool. So, I was able to get the form data by looking at the error XML file. Thanks again!
AbeP