windows-services

Start/Stop services using JNA

风流意气都作罢 提交于 2021-02-06 11:09:48
问题 I am writing a utility to start and stop windows services. The program will be distributed across many computers with differing levels of user privileges so I don't want to use the command line. I've tried using JNA, import com.sun.jna.platform.win32.W32Service; import com.sun.jna.platform.win32.W32ServiceManager; import com.sun.jna.platform.win32.Winsvc; /** * * @author */ public class WindowsServices { /** * @param args the command line arguments */ public static void main(String[] args) {

Start/Stop services using JNA

放肆的年华 提交于 2021-02-06 11:07:26
问题 I am writing a utility to start and stop windows services. The program will be distributed across many computers with differing levels of user privileges so I don't want to use the command line. I've tried using JNA, import com.sun.jna.platform.win32.W32Service; import com.sun.jna.platform.win32.W32ServiceManager; import com.sun.jna.platform.win32.Winsvc; /** * * @author */ public class WindowsServices { /** * @param args the command line arguments */ public static void main(String[] args) {

Windows service with FileSystemWatcher and Timer - making sure everything gets disposed

ⅰ亾dé卋堺 提交于 2021-02-04 14:13:33
问题 I have created a C# Windows Service application that starts a FileSystemWatcher to monitor a directory for the creation of a file. When the file is found I instantiate a custom class that parses the file (CSV) and calls a web service with it's contents. The service is somewhat asynchronous and returns a unique number which must be used for subsequent calls to check its progress. In my process class I create a timer to continually check to see if the job is finished. I am dispose ing and close

Getting error from window service with Exception code: 0xc0000005

放肆的年华 提交于 2021-01-29 13:34:24
问题 We are getting error on server and our service is automatically stopped in the server. Randomly application is crash in approx 1 hour with below Error as - Faulting application name: Chubb.Studio.Event.Processor.exe, version: 0.0.0.0, time stamp: 0x5c0ab1b7 Faulting module name: KERNELBASE.dll, version: 6.3.9600.19425, time stamp: 0x5d26b6e9 Exception code: 0xc0000005 Fault offset: 0x0000000000001556 Faulting process id: 0x115c Faulting application start time: 0x01d5a35fd202f96d Faulting

How to disable credentials input for HTTPS call to my WCF hosted in windows service

耗尽温柔 提交于 2021-01-29 10:53:03
问题 I'm just creating my first WCF project, so I have a lot of deficiencies in knowledge in this field. My problem is that when I'm calling my WCF url in web browser, I have to enter the credentials but I cannot even use my domain name and password, but I have to choose my personal chip card certificate and enter it's password. After that, everything work like a charm. My final product should be installed on every user workstation in our domain for IT operations purposes only. So there will be

WCF ContractFilter Mismatch when enabling Reliable Session

﹥>﹥吖頭↗ 提交于 2021-01-29 07:41:51
问题 I have a WCF service hosted in a Windows Service. I then have a GUI(client) that then communicates to this service. It has recently been reported that communication with the service stops after being idle for 10 minutes. I have done a bit of research and it looks like the service is discarding the connection due to inactivity. Therefore I want to increase the receive timeout and enable reliable sessions and set an inactivityTimeout to be longer. However when I do this in both the WCF service

Google API access from Windows Service

女生的网名这么多〃 提交于 2021-01-28 19:33:39
问题 I implemented Google apps API in a MVC Web app, to access for Admin SDK to add/remove users from Google apps account. In my web app, first the user needs to authenticate with the Google Apps account (OAuth 2.0), then I store the accesstoken and refreshtoken in the database storage. After that,Admin SDK API calls to add/remove user functionality in the web app uses the "offline" mode as it does not pop up the consent screen. But I need to use my database token storage(accesstokens

Google API access from Windows Service

我与影子孤独终老i 提交于 2021-01-28 19:20:38
问题 I implemented Google apps API in a MVC Web app, to access for Admin SDK to add/remove users from Google apps account. In my web app, first the user needs to authenticate with the Google Apps account (OAuth 2.0), then I store the accesstoken and refreshtoken in the database storage. After that,Admin SDK API calls to add/remove user functionality in the web app uses the "offline" mode as it does not pop up the consent screen. But I need to use my database token storage(accesstokens

Access to new RabbitMQ messages from windows service

放肆的年华 提交于 2021-01-28 08:02:33
问题 I am trying to read new messages from RabbitMQ using a Windows service but the event of receiving new messages doesn't fire. This service could be launched as a Console Application in Debug Mode. In this case the event fires and I can read new messages. The service is launched with the user I use to log into Windows. This is a part of code in the OnStart service event handler var factory = new ConnectionFactory() { HostName = "localhost" }; using (var conn = factory.CreateConnection()) {

Error 0xc00e0003 in MSMQ + WCF inside a Windows Service

狂风中的少年 提交于 2021-01-28 07:46:28
问题 I am hosting a WCF Service, that uses MSMQ, inside a Windows Service. Problem: After installing the service, I am unable to start the service. Event log has following information: Service cannot be started. System.InvalidOperationException: There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exception may contain additional information. ---> System.ServiceModel.MsmqException: An error