سؤال

I am using ELMAH to log exceptions thrown in my ASP.NET MVC project. The logging works like a charm, but i want to store additional information on errors. For this purpose the user has a text-area on the friendly error-page so he can enter for example which steps he took before the error occurred... The plan was to add the additional data to the exception and then update the entry.

Model.Exception.Data.Add("userData", stuff);

My problem is, that ELMAH writes the db-entry BEFORE he redirects to the friendly error-page. Is there a way to tell elmah to 'update' a log-entry with custom information?

هل كانت مفيدة؟

المحلول

i solved it by deleting the entry and then re-insert it using the server-variables for the user-text.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top