Application Event ID 1309 ASP.Net 4.0.30319.0 with Exception type: COMException

Wanchat 0 Reputation points
2023-06-28T08:02:00.7+00:00

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>
Microsoft 365 and Office | Excel | For business | Windows
Developer technologies | ASP.NET | Other
{count} votes

1 answer

Sort by: Most helpful
  1. QiYou-MSFT 4,341 Reputation points Microsoft External Staff
    2023-06-29T07:22:02.9866667+00:00

    Hi @Wanchat

    0x800AC472 is the VBA_E_IGNORE error returned when the object model call is invoked while the property browser is suspended.

    This post can help you: HRESULT 0x800ac472 from set operations in Excel

    At the same time, a mismatch in the number of bits running can cause the same problem. You need to make sure that your excel bitness matches the bitness your server is running.

    Best Regards

    Qi You


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.