Allow setting long preshutdown time in Windows Services #30386
Open
Description
This blog post describes how we can create Windows Service using .NET Core Workers.
Currently, I have several Windows Services that are responsible for converting documents.
Because the process can take a long time to complete I added a "hacky" way to change SERVICE_PRESHUTDOWN_INFO
using ChangeServiceConfig2
from advapi32.dll
and I accept SERVICE_ACCEPT_PRESHUTDOWN
command.
For more info take a look at this Stack Overflow answer.
Now creating windows services is possible using .NET Core so I'd like to ask to expose a way to configure preshutdown time without using such hacky ways.