Closed Phylum123 closed 1 year ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Tagging subscribers to this area: @dotnet/area-extensions-hosting See info in area-owners.md if you want to be subscribed.
Author: | Phylum123 |
---|---|
Assignees: | - |
Labels: | `untriaged`, `area-Extensions-Hosting` |
Milestone: | - |
Can anyone look at this?
We'll get into this when we are triaging it. And please provide a complete sample reproducing the issue we can look at.
This issue has been marked needs-author-action
and may be missing some important information.
This issue has been automatically marked no-recent-activity
because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity
.
This issue will now be closed since it had been marked no-recent-activity
but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.
Description
I created a windows service, by using the worker project template and then referencing the extension.windowsservice Nuget package. I added UseWindowsService to the host creation. Without any changes I deployed the default service using SC.exe and it worked just fine. I then added some logic to the worker and updated the program.cs to load a few more things. The whole startup is around 800ms. I run the program in debug mode and it works as expected. However, when I try to use the new version as a target of SC, it installs but won't start due to error 1053. The weird part is the error comes up almost immediately, it is not waiting 30 seconds. Checking the event log I get two events - 7000, 7009. Event 7009 verifies the time out is set to 30 seconds (30,000ms).
The second weird part is that if I just execute the exe, all is well and it runs as expected, except with a console window.
Is there any way to get a more meaningful message or something else I can try to figure out why it is not working as a windows service?
Below is the project file.
Reproduction Steps
See above
Expected behavior
The program to function as a windows service.
Actual behavior
Error 1053
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response