问题
I have built a window application which i am trying to turn into service. I am easily able to install it but when i try to run that service , it shows:
Windows could not start the service on local computer error 1067. The process terminated unexpectedly.
In the event view property logs , error with event id 7034 is seen but no error description. Already searched a lot for solution but no success.
回答1:
I also got same error some time back. This error has several reasons. One reason can be u are specifying some path to the file or location which the service is unable to read or write after it is installed.
回答2:
This happens when the compilation target CPU differs from the server CPU type.
Ex. running x86 built service on x64 server,
Make sure you build the project with the correct target CPU or with AnyCPU.
Visual Studio -> Project properties -> Compile -> (Select configuration) -> Target CPU -> AnyCPU
来源:https://stackoverflow.com/questions/28941659/windows-could-not-start-the-service-on-local-computer-error-1067-on-windows-serv