Могу ли я запустить консольное приложение C# в качестве службы windows на компьютере?
I recently built a C# console application and it is working fine when I execute the file. However, the client requested that I run it as a service. Is that even possible without me recoding the entire application as a Windows Service app in c#? Another drawback is that I am not familiar with writing windows services if I convert it. I have tried following instructions from https://www.howtogeek.com/50786/using-srvstart-to-run-any-application-as-a-windows-service/ but when I start my service it errors out with 1067: The process terminated unexpectedly. I am really unsure what to do at this point. Is there other way that I can run my console app as a windows service without having to re-code everything? Thanks, -h What I have tried: I already created a console app that runs without issues, but client requested we run this as a service. I know nothing about windows services, I want to learn but due to time constraint, Im looking for most efficient option possible. Any suggestions or help really is much appreciated. it has been a while and I am really starting to learn c# again.
ZurdoDev
Добавьте ведение журнала в свое приложение, чтобы узнать, почему оно выходит из строя. И посмотрите в окне просмотра событий, чтобы узнать, есть ли еще какая-нибудь информация.