我有一个用于 asp.net 站点的自定义错误处理程序。
void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
//if (System.Configuration.ConfigurationManager.AppSettings["ProductionMode"] == "Yes")
#if (!DEBUG)
Server.Transfer("~\\GlobalExceptionHandler.aspx");
#endif
}
它在检索异常信息时工作得很好而且很花哨,因为它只会被卡住Server.getLastException()
并通过电子邮件发送给我以供审查
但是,我在页面上有一些文本框,我想将这些文本框的值与电子邮件一起发送。也许这不是我要访问的 DOM,而是那些已发布的变量。
我试着看,HttpContext.Current.Request.Form
但它没有显示任何键。
那么有谁知道在全局捕获异常时如何访问表单值?