In program.cs you can change or set the service name.
static void Main()
{
ServiceBase[] ServicesToRun;
SelfHostService _selfHostService = new SelfHostService();
//Below you can set the service name. In my case service name is PrintAPIHeartTest.
_selfHostService.ServiceName = "PrintAPIHeartTest";
ServicesToRun = new ServiceBase[]
{
_selfHostService
};
ServiceBase.Run(ServicesToRun);
}
static void Main()
{
ServiceBase[] ServicesToRun;
SelfHostService _selfHostService = new SelfHostService();
//Below you can set the service name. In my case service name is PrintAPIHeartTest.
_selfHostService.ServiceName = "PrintAPIHeartTest";
ServicesToRun = new ServiceBase[]
{
_selfHostService
};
ServiceBase.Run(ServicesToRun);
}
No comments:
Post a Comment