We are using
ELMAH for our
MVC asp.net application.
ELMAH sends error mail which has an event ErrorMail_Mailing,
I am writing handler for this event inside my Global.asax
and trying to read value from
HttpContext.Current.Items variable but getting
Any work around please help.
I am applying what Scott is suggesting here:-
In global.asax.cs I am trying to write below event handler, where I want to configure subject line of error mail with something stored inside my
protected void ErrorMail_Mailing(object sender, Elmah.ErrorMailEventArgs e)
if (HttpContext.Current.Items["CustomerName"] != null)
e.Mail.Subject = "Error came to/" + HttpContext.Current.Items["CustomerName"] + "/Error Type: " +