3

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?

RBT
  • 24,161
  • 21
  • 159
  • 240
melikek
  • 39
  • 1
  • 3
  • 1
    Possible duplicate of [How should you diagnose the error SEHException - External component has thrown an exception](http://stackoverflow.com/questions/1313853/how-should-you-diagnose-the-error-sehexception-external-component-has-thrown-a) – sgmoore Feb 07 '17 at 13:59

1 Answers1

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.

Ian
  • 1,221
  • 1
  • 18
  • 30