Elmah:如何记录表单发布数据?

发布于 2024-09-27 08:44:05 字数 403 浏览 1 评论 0原文

有没有办法在 ELMAH 中记录 post 请求数据?

我收到错误电子邮件,虽然错误日志包含 URL、请求方法等,但我没有看到实际的 POST 数据。

例如,

这是一个示例 实际请求:/bep/KotexCode/GetCode?stickerCode=1234532

但是,日志仅显示请求 url,而不显示变量 StickerCode。 谢谢!

编辑 抱歉,我应该检查项目网站,但看起来有人请求此功能。 http://code.google.com/p/elmah/issues/detail ?id=164

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

话少心凉 2024-10-04 08:44:05

ELMAH 讨论组,逐字引用如下:

ELMAH 实际上记录了所有表单
数据。它不显示在旁边
默认情况下,服务器变量
查看错误详细信息页面但可以
从原始 XML 视图中挖掘出来
完全相同的页面。表格数据,
然而,也不包含在
电子邮件。

省略的真正原因
表单数据的显示是为了避免
来自大量 ASP.NET 的膨胀和噪音
具有非常大视图的应用程序
状态(数百 KB)。另外,一些
表单在文本区域中包含大量 HTML
领域(尤其是 CMS 系统)
也可能导致大量
噪音。在没有任何一个好的情况下
适合所有尺寸的解决方案,
问题已被留在外面
ELMAH 的范围(尽管仍然开放
供讨论)。如果有人需要
显示FORM数据,自定义错误
详细信息页面的编码速度非常快。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文