System.ComponentModel.Win32Exception (0x80004005): 创建窗口句柄时出错。
在 System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
在 System.Windows.Forms.Control.CreateHandle()
在 System.Windows.Forms.TextBoxBase.CreateHandle()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.SetVisibleCore(Boolean value)
在 Microsoft.Reporting.WinForms.WinRSviewer.ShowMessage(String text, Boolean enabled)
在 Microsoft.Reporting.WinForms.ReportViewer.UpdateUIState(Exception e)
在 Microsoft.Reporting.WinForms.ReportViewer.OnRenderingComplete(Object sender, AsyncCompletedEventArgs args)
在 Microsoft.Reporting.WinForms.AsyncReportOperation.EndAsyncExecution(Exception e)
在 Microsoft.Reporting.WinForms.ReportViewer.<>c__DisplayClass1.<OnBackgroundThreadCompleted>b__0()
在 Microsoft.Reporting.WinForms.ReportViewer.ProcessAsyncInvokes()
在 Microsoft.Reporting.WinForms.ReportViewer.Dispose(Boolean disposing)
在 System.ComponentModel.Component.Dispose()
在 SyncMyProductSend.AppDomainTest.LoadData(DataTable rs1, DataTable rs2, DataTable rs3, DataTable ds4, String BrandCode, String productcode, String imgUrl)
在 SyncMyProductSend.AppDomainTest.LoadData(DataTable rs1, DataTable rs2, DataTable rs3, DataTable ds4, String BrandCode, String productcode, String imgUrl)
在 SyncMyProductSend.Program.CreateExportFile()
在 SyncMyProductSend.Program.Run()
在 SyncMyProductSend.Program.Main(String[] args)
直接运行SyncMyProductSend.exe 没有问题,但是在计划任务启动 SyncMyProductSend.exe 报创建窗口句柄时出错。
rdlc .net4.0 用了卸载 Appdomain ,Reporting.WinForms.ReportViewer 还是会报错失败。
解决方案:待定。
https://www.cnblogs.com/panjinzhao/p/11401144.html
本文探讨了在使用计划任务启动SyncMyProductSend.exe时遇到的System.ComponentModel.Win32Exception(0x80004005)错误,详细分析了创建窗口句柄时出错的具体场景及可能的原因,尽管在直接运行时未出现此问题。文中提及rdlc.net4.0和Appdomain的使用,并讨论了Reporting.WinForms.ReportViewer组件在此上下文中的表现,当前解决方案仍在研究中。

3013

被折叠的 条评论
为什么被折叠?



