1
Vote

'Object reference not set to an instance of an object' in ErrorDetail.aspx

description

When an error just occured and the issue id is not processed yet, you get an error on the detail page.
The error is thrown in the file "ErrorDetailBase.cs" because the O1Error object is null.
 
O1Error = provider.Context.ELMAH_Errors.SingleOrDefault(err => err.ErrorId == ErrorId);
ElmahError = new Error();
var reader = new XmlTextReader(new StringReader(O1Error.AllXml.ToString()));

comments