Because the project needs to develop Windows services, when replacing Windows service program files, it needs to be stopped first, otherwiseThe file will be occupied and cannot be replaced。
Replacement program files are replaced by FTP or shared network disks, and do not require logging in to the server.
It is troublesome to log in to the server every time you stop or start Windows services (The server is a bastion machineSo, using ASP.NET Core to develop a ServiceAdmin project, you can implementStarts, stops, and restarts Windows services via the web。
Using ASP.NET Core publishing specifies the target platform, so, the serverNo installation is required.NET SDK。
First, take a look at the screenshot:
Program core code:
Attach a bat script, start the project with scripts, scriptsMust be run as an administratorBecause, some services require administrator privileges, and the script is as follows:
Source code download:
Tourists, if you want to see the hidden content of this post, please Reply
|