I've web application on Windows Server 2019 that able to download result as excel file.
But when I've download I got error message "Exception from HRESULT: 0x800AC472".
I found this warning in Event Viewer.
Hope someone can help me to fix this issue.
(I've installed excel 2021 on my server)
Log Name: Application
Source: ASP.NET 4.0.30319.0
Date: 6/22/2023 8:07:57 AM
Event ID: 1309
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: PRODUCTION_SERVER
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/22/2023 8:07:57 AM
Event time (UTC): 6/22/2023 1:07:57 AM
Event ID: 2414438c58394b2eb0c7435a02501d5e
Event sequence: 1117
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/MyApp-1-133318656483194052
Trust level: Full
Application Virtual Path: /MyApp
Application Path: E:\MyApp\Application\MyApp-GUI\
Machine name: PRODUCTION_SERVER
Process information:
Process ID: 2504
Process name: w3wp.exe
Account name: IIS APPPOOL\DefaultAppPool
Exception information:
Exception type: COMException
Exception message: Exception from HRESULT: 0x800AC472
at HPCom.SP.SPExcelUtil.ExportDataTableToCreateExcelFile(String sFileName, DataTable dtData, DataTable dtMaster, Page p) in D:\MyApp\MyApp\SPExcelUtil.vb:line 600
at Master_Employee_Controls_EmployeeProfile.btnDownload_Click(Object sender, EventArgs e) in E:\MyApp\Application\MyApp-GUI\Controls\EmployeeProfile.ascx.vb:line 1908
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Request information:
Request URL: https://MyUrl:443/MyApp/Employee/Main.aspx
Request path: /MyApp/Employee/Main.aspx
User host address: 10.110.10.110
User: *
Is authenticated: True
Authentication Type: Forms
Thread account name: IIS APPPOOL\DefaultAppPool
Thread information:
Thread ID: 71
Thread account name: IIS APPPOOL\DefaultAppPool
Is impersonating: False
Stack trace: at HPCom.SP.SPExcelUtil.ExportDataTableToCreateExcelFile(String sFileName, DataTable dtData, DataTable dtMaster, Page p) in D:\MyApp\MyApp\SPExcelUtil.vb:line 600
at Master_Employee_Controls_EmployeeProfile.btnDownload_Click(Object sender, EventArgs e) in E:\MyApp\Application\MyApp-GUI\Controls\EmployeeProfile.ascx.vb:line 1908
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 4.0.30319.0" />
<EventID Qualifiers="32768">1309</EventID>
<Version>0</Version>
<Level>3</Level>
<Task>3</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2023-06-22T01:07:57.2955786Z" />
<EventRecordID>4459</EventRecordID>
<Correlation />
<Execution ProcessID="0" ThreadID="0" />
<Channel>Application</Channel>
<Computer>PRODUCTION_SERVER</Computer>
<Security />
</System>
<EventData>
<Data>3005</Data>
<Data>An unhandled exception has occurred.</Data>
<Data>6/22/2023 8:07:57 AM</Data>
<Data>6/22/2023 1:07:57 AM</Data>
<Data>2414438c58394b2eb0c7435a02501d5e</Data>
<Data>1117</Data>
<Data>1</Data>
<Data>0</Data>
<Data>/LM/W3SVC/1/ROOT/MyApp-1-133318656483194052</Data>
<Data>Full</Data>
<Data>/MyApp</Data>
<Data>E:\MyApp\Application\MyApp-GUI\</Data>
<Data>PRODUCTION_SERVER</Data>
<Data>
</Data>
<Data>2504</Data>
<Data>w3wp.exe</Data>
<Data>IIS APPPOOL\DefaultAppPool</Data>
<Data>COMException</Data>
<Data>Exception from HRESULT: 0x800AC472
at HPCom.SP.SPExcelUtil.ExportDataTableToCreateExcelFile(String sFileName, DataTable dtData, DataTable dtMaster, Page p) in D:\MyApp\MyApp\\SPExcelUtil.vb:line 600
at Master_Employee_Controls_EmployeeProfile.btnDownload_Click(Object sender, EventArgs e) in E:\MyApp\Application\MyApp-GUI\Controls\EmployeeProfile.ascx.vb:line 1908
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</Data>
<Data>https://MyUrl:443/MyApp/Master/01Employee/Main.aspx</Data>
<Data>/MyApp/Master/01Employee/Main.aspx</Data>
<Data>10.110.10.110</Data>
<Data>*</Data>
<Data>True</Data>
<Data>Forms</Data>
<Data>IIS APPPOOL\DefaultAppPool</Data>
<Data>71</Data>
<Data>IIS APPPOOL\DefaultAppPool</Data>
<Data>False</Data>
<Data> at HPCom.SP.SPExcelUtil.ExportDataTableToCreateExcelFile(String sFileName, DataTable dtData, DataTable dtMaster, Page p) in D:\MyApp\MyApp\\SPExcelUtil.vb:line 600
at Master_Employee_Controls_EmployeeProfile.btnDownload_Click(Object sender, EventArgs e) in E:\MyApp\Application\MyApp-GUI\Controls\EmployeeProfile.ascx.vb:line 1908
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</Data>
</EventData>
</Event>