c# - SEH异常 (0x80004005) : External component has thrown an exception

标签 c# windows-services windows-8.1

我开发了一个 Windows 服务,我可以使用 visual studio 对其进行调试,并且它按预期工作。但是,如果我使用 installUtil.exe 安装服务并启动它,我会遇到以下异常:

System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.

我尝试清理解决方案,将其卸载并重新安装。我什至重新启动了计算机,但没有任何变化。我尝试使用我的本地管理员凭据运行 Windows 服务,但结果是一样的。我可以在同事的计算机上成功安装并启动该服务。您对我在自己的计算机上成功启动服务有何建议?

最佳答案

我有一个类似的问题,安装在一台特定计算机上的 C# 服务应用程序无法启动,并且在 Windows 事件日志中记录了与上述相同的错误。

删除应用程序已安装的可执行文件并从安装程序镜像手动复制它解决了问题。因此,损坏的文件似乎会导致该类型的 SEHException。

关于c# - SEH异常 (0x80004005) : External component has thrown an exception,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42091228/

相关文章:

javascript - 使用 javascript 或 JS 或 angularJS for Windows 8 创建用户控件

c# - List.Distinct()可以应用于List<List<String>>的列表类型吗?

c# - Entity Framework 多对多自关联与乐观并发控制

.net - 什么用于重复性(每日、每周、每月)任务?工作流、Windows 服务,还是其他?

.net-core - 当工作线程是事件驱动时,BackgroundService.ExecuteAsync 应该返回什么?

delphi - Windows 平板电脑上使用 Delphi VCL 进行长触摸

javascript - FileUpload HasFile 返回 false

c# - 如何从下拉列表传递参数

c++ - 将 HANDLE 传递到从 Windows 服务到用户应用程序的管道

windows-8 - 在 Windows 应用商店应用程序的代码隐藏中转到网格内的视觉状态