Showing posts with label HRESULT E_FAIL has been returned from a call to a COM component. At System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal. Show all posts
Showing posts with label HRESULT E_FAIL has been returned from a call to a COM component. At System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal. Show all posts

20 March, 2014

ERROR HRESULT E_FAIL while working on audit reports - Resolved

Error HRESULT E_FAIL while working on audit reports - Resolved

Problem description:
Facing an issue here in Audit Reports. The issue is when one site collection admin tries to run the Security Settings Audit report the report is getting generated successfully; however if another site collection admin tries to run the same report he gets an error. When checked in to the log files the error was "System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component. At System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal

Error message:
HRESULT E_FAIL has been returned from a call to a COM component. At System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal

Logs:
System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.Office.Server.OpenXml.Internal.ByteStream.Write(Byte[] rgb, Int32 offset, Int32 cb) at System.IO.BufferedStream.FlushWrite() at System.IO.BufferedStream.Flush() at System.IO.StreamWriter.Dispose(Boolean disposing) at System.IO.StreamWriter.Close() at System.Xml.XmlTextWriter.Close() at Microsoft.Office.RecordsManagement.Reporting.AuditReportGenerator.CloseDataPart() at Microsoft.Office.RecordsManagement.Reporting.AuditReportGenerator.Dispose() at Microsoft.Office.RecordsManagement.Reporting.ReportData.CloseCurrentReport() at Microsoft.Office.RecordsManagement.Reporting.ReportData.Dispose() at Microsoft.Office.RecordsManagement.Reporting.ReportBase.AggregateReports(Hashtable query, SPFolder folder, ReportNameGenerator reportNameGenerator) at Microsoft.Office.RecordsManagement.Reporting.ApplicationPages.CustomizeReport.OKBtn_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Troubleshooting steps:
1.   Working for few users so it’s not a global issue
2.   Working in other browser but not in IE
3.   There are no multiple domains for whom it’s not working
4.   No restrictions on user accounts via GPO
5.   No errors in the event logs
6.   Other SP functionality is working fine for those users for whom auditing is not working

Resolution:
1.   For whom it’s not working, let him logged in to the SharePoint site

2.   Open the SharePoint site

3.   IE -> Tools -> compatibility settings

4.   Check "Display all websites in compatibility view".

5.   Add your SharePoint site on the top ("add this website" section) if its empty (by default it takes but sometimes it’s not)

6.   Refresh it and check the results

If you have any queries/questions regarding the mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Product applies to:
a)   SharePoint Server 2010
b)   SharePoint Foundation 2010
c)   SharePoint Server 2013
d)   SharePoint Foundation 2013