windows-services

Weird Issue With Windows Service - Service Timing Out

痴心易碎 提交于 2020-06-22 04:11:05
问题 Hi there I have piece of legacy (VS2010) Windows Service code that I have imported into VS2017 and is causing me severe frustration. This code has worked well for about the last 6 years, however when I carry out the install and attempt to start the service the SCM comes back with a timeout error. The OnStart code is as follows: Protected Overrides Sub OnStart(ByVal args() As String) 'Instaniate the timer for the service _serviceTimer = New Threading.Timer(New Threading.TimerCallback(AddressOf

Weird Issue With Windows Service - Service Timing Out

不问归期 提交于 2020-06-22 04:09:20
问题 Hi there I have piece of legacy (VS2010) Windows Service code that I have imported into VS2017 and is causing me severe frustration. This code has worked well for about the last 6 years, however when I carry out the install and attempt to start the service the SCM comes back with a timeout error. The OnStart code is as follows: Protected Overrides Sub OnStart(ByVal args() As String) 'Instaniate the timer for the service _serviceTimer = New Threading.Timer(New Threading.TimerCallback(AddressOf

VS Installer Projects - Perform some code after installation

旧时模样 提交于 2020-06-16 19:18:51
问题 I have Visual Studio 2017 and just added the Microsoft Visual Studio Installer Projects extension. The project I want to add to the installer is a Windows Service application build by Topshelf . To manually install the Windows Service, I open a CMD window as admin and run a command in the application folder (eg. bin/debug) to install the Windows Service app. Issue Now, I know for sure that the installer has no convenient feature to install the Service, as the only thing it does (in simple

VS Installer Projects - Perform some code after installation

谁都会走 提交于 2020-06-16 19:18:49
问题 I have Visual Studio 2017 and just added the Microsoft Visual Studio Installer Projects extension. The project I want to add to the installer is a Windows Service application build by Topshelf . To manually install the Windows Service, I open a CMD window as admin and run a command in the application folder (eg. bin/debug) to install the Windows Service app. Issue Now, I know for sure that the installer has no convenient feature to install the Service, as the only thing it does (in simple

How to handle Appsettings for .net core 3.1 self contained single file publish

老子叫甜甜 提交于 2020-06-15 16:10:09
问题 I have a new .NET Core 3.1 worker class that is hosted as a Windows Service. I am using the default appsettings.json and appsettings.environment.json that were created by the template. The appsettings is loaded from the hostContext during ConfigureServices .ConfigureServices((hostContext, services) => { services.AddHostedService<Worker>(); services.Configure<BasicSettings>(hostContext.Configuration.GetSection("AppSettings")); }); I want to be able to edit the appsettings after it is deployed

How to handle Appsettings for .net core 3.1 self contained single file publish

筅森魡賤 提交于 2020-06-15 16:07:50
问题 I have a new .NET Core 3.1 worker class that is hosted as a Windows Service. I am using the default appsettings.json and appsettings.environment.json that were created by the template. The appsettings is loaded from the hostContext during ConfigureServices .ConfigureServices((hostContext, services) => { services.AddHostedService<Worker>(); services.Configure<BasicSettings>(hostContext.Configuration.GetSection("AppSettings")); }); I want to be able to edit the appsettings after it is deployed

Don't override the service account when upgrading a service using WiX toolset

允我心安 提交于 2020-06-01 05:55:33
问题 I am trying to setup a WiX installer that install a windows service and handles upgrades and updates. The installer works like a charm, the user installs the service under the LocalSystem account then a service engineer has to assign a domain account to that service. Here is my service installer component: <Component Id="my_exe_Component"> <File Id="Myexe" Source="$(var.Myproject.TargetPath)" KeyPath="yes" /> <ServiceInstall Id="my_exe" Type="ownProcess" Vital="no" Name="NME" DisplayName="My

Error while starting python windows service executable

你说的曾经没有我的故事 提交于 2020-05-15 04:50:44
问题 I am trying to make a python windows service as instructed from https://www.thepythoncorner.com/2018/08/how-to-create-a-windows-service-in-python/ The service installed directly from python console runs just fine. but when I make the executable file (for server without python environment) by auto-py-to-exe and install via command prompt it installs but gave this error windows_service.exe install Installing service TestService Changing service configuration service Updated windows_service.exe

Create msi of asp.net web api core 2.0 project

家住魔仙堡 提交于 2020-05-13 06:12:05
问题 I am creating a ASP.net core 2.0 WEB API project that is required to be deploy as a Windows service on a system using a MSI setup. Is there any way I can do it ? Things that I have already tried: I created an MSI using Setup Project but it doesn't load any dependencies. I tried to create an msi using WIX but it shows error The WiX Toolset v3.11 (or newer) build tools must be installed to build this project I have tried solution which are already answered on this and this. 回答1: Short on time,

Dockerizing a Windows Service

扶醉桌前 提交于 2020-04-18 01:12:18
问题 I am new to docker and I have an application including a set of windows services (.NET). I d like to run it into a docker container. What should I do ? 回答1: In general, you should choose a base image which has the necessary libraries already installed on it as much as possible instead of taking a very base image such as plain Linux or Windows and installing on it. In your case, select a docker image which has .NET installed on it.This image for instance The ideal flow is as follows. Select