windows-services

Python win32 service

只愿长相守 提交于 2019-12-20 02:29:13
问题 I have a minimal python win32 service service.py that does nothing special: import win32serviceutil import win32service import win32event class SmallestPythonService(win32serviceutil.ServiceFramework): _svc_name_ = "SmallestPythonService" _svc_display_name_ = "display service" # _svc_description_='ddd' def __init__(self, args): win32serviceutil.ServiceFramework.__init__(self, args) self.hWaitStop = win32event.CreateEvent(None, 0, 0, None) def SvcStop(self): self.ReportServiceStatus

Making an existing exe with gui into windows service

只愿长相守 提交于 2019-12-20 02:27:21
问题 I have a c# project that is more or less a exe file with a GUI ontop to make some settings. The projects purpose is to collect data either when the users forces a collect or when a time has been reached everyday that has been set by the user. There is also an installer project for this, all bundled in VS2010 for .NET 3.0. I would like to take part of my code to be used by windows service. The part that everyday at a given time should perform a collect data operation. So my question is, can I

Topshelf window service giving Error 1053 when try to start the service

﹥>﹥吖頭↗ 提交于 2019-12-20 01:01:09
问题 I have developed a windows service using Topshelf. it works fine locally. When i deployed to test and try to start the service, it is giving me the following error: Error 1053: The service did not respond to the start or control request in a timely fashion. The test server is running on Windows server 2012. This is my service start and stop methods: public void Start() { _logProvider.Info("Service started."); StartScheduledJobs(); } public void Stop() { _scheduler.Shutdown(true); _logProvider

Should I use a Windows Service or an ASP.NET Background Thread?

非 Y 不嫁゛ 提交于 2019-12-19 19:04:55
问题 I am writing a web application in ASP.NET 3.5 that takes care of some basic data entry scenarios. There is also a component to the application that needs to continuously poll some data and perform actions based on business logic. What is the best way to implement the "polling" component? It needs to run and check the data every couple of minutes or so. I have seen a couple of different options in the past: The web application starts a background thread that will always run while the web

Should I use a Windows Service or an ASP.NET Background Thread?

只谈情不闲聊 提交于 2019-12-19 19:03:32
问题 I am writing a web application in ASP.NET 3.5 that takes care of some basic data entry scenarios. There is also a component to the application that needs to continuously poll some data and perform actions based on business logic. What is the best way to implement the "polling" component? It needs to run and check the data every couple of minutes or so. I have seen a couple of different options in the past: The web application starts a background thread that will always run while the web

how to consume wcf service hosted by windows service using java script

…衆ロ難τιáo~ 提交于 2019-12-19 11:46:11
问题 Hi i had a wcf service hosted using windows service and the hosting of service was successfully completed and now my requirment is to consume it in javascript and the service returns table and it was in xml format with column names as tags in it so how to read date in it 回答1: I had got the answer Here is the code written in javascript <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> window.onload =

Windows Service Application Controller

帅比萌擦擦* 提交于 2019-12-19 10:58:33
问题 Here is the premise: I have a desktop that I need to be able to start up and stop applications on, but cannot get remote access to. What I had in mind is setting up a service on the machine that will start/stop a list of applications as told. This windows service will periodically pole a web service for new commands and execute them accordingly. These are my questions. 1) Is this the easiest solution? What else would you recommend? 2) How hard is it to run an exe from a windows service? How

How can we find the process ID of a running Windows Service?

白昼怎懂夜的黑 提交于 2019-12-19 10:24:10
问题 I'm looking for a good way to find the process ID of a particular Windows Service. In particular, I need to find the pid of the default "WebClient" service that ships with Windows. It's hosted as a "local service" within a svchost.exe process. I see that when I use netstat to see what processes are using what ports it lists [WebClient] under the process name, so I'm hoping that there is some (relatively) simple mechanism to find this information. 回答1: QueryServiceStatusEx returns a SERVICE

Should I implement IDisposable on a singleton?

余生颓废 提交于 2019-12-19 09:58:24
问题 I have a windows service, which contains a singleton which in turn uses some loggers, message queue listeners and so on. Those classes implements IDisposable . Should I implement IDisposable in singleton itself or do something else to ensure that after service stop/crashing everything will be okay with native resources? The singleton is implemented like this: public class Temp { private static readonly Lazy<Temp> instance = new Lazy<Temp>(() => new Temp()); private Temp() { // create

C#: Making an Installer that installs both a WPF application (ClickOnce) and a Windows Service

a 夏天 提交于 2019-12-19 09:02:01
问题 I currently have a VS Solution with 2 projects: a WPF application and a Windows Service. Now, I have managed to get ClickOnce working in installing my WPF application, but I also want a Windows Service to be installed (the one in the project) during this installation. I have found ways how to programmatically start a windows service with C# code, but is there any way to incorporate this in my ClickOnce installation (because I need ClickOnce's benefit of automatic updates and such)? 回答1: I don