elmah / Elmah

Error Logging Modules & Handlers for ASP.NET
https://elmah.github.io/
Apache License 2.0
306 stars 65 forks source link

Include session data in the error object (would be useful in ErrorMail_Mailing event handler) #435

Open yornstei opened 5 years ago

yornstei commented 5 years ago

I was looking to use the session data in the ErrorMail_Mailing event handler in global.asax (yes still using asp.net webforms). However, there's no access to session data in the error object and therefore is't not accessible from the ErrorMailEventArgs. After searching for a while i found others encountered this issue too and found Stefan Egli answer on stackoverflow (https://stackoverflow.com/questions/2685657/add-a-session-variable-or-custom-field-to-the-elmah-error-log-table) for how to add session data in the error object. I added it to my cloned solution and it worked.

Is there a reason this functionality isn't included in Elmah? should I create a pull request to add it?