SEHException (0x80004005): External component has thrown an exception

2

I have developed a windows service, I can debug it using visual studio and it works as expected. But if I install the service using the installUtil.exe and start it I'm getting the following exception:

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

I tried cleaning the solution, uninstalled and re-installed it. I even restarted my computer but nothing changes. I tried running the windows service with my local administrator credentials but the result is the same. I can install and start the service successfully on my coworkers computer. What do you suggest to me to start the service successfully on my own computer?

c#
windows-services
windows-8.1
asked on Stack Overflow Feb 7, 2017 by melikek • edited Feb 21, 2018 by RBT

1 Answer

1

I had a similar problem, where a C# service application installed on one particular computer failed to start, with the same error as above logged in the Windows Event Log.

Deleting the application's installed executable file and copying it manually from the installer image solved the problem. Hence it appears that a corrupt file can lead to that type of SEHException.

answered on Stack Overflow Jan 15, 2019 by Ian

User contributions licensed under CC BY-SA 3.0