windows-services

Windows Service or Task Scheduler for maintenance tasks?

风流意气都作罢 提交于 2019-11-30 14:12:52
问题 I have a C# Application that does some maintenance tasks. It needs to run roughly every hour, although it's not too important if it's a bit off. And it has to run on a Win2003 Server with no one logged in. Basically I wonder if I should write a Windows Service, and if yes, if Thread.Sleep() is a proper way to pause the Thread for an hour, or if there are better ways to make sure the Thread stays idle and does not put any server load? (aka. what is the most opposite of a Spinlock) The

Can't start mongodb service

帅比萌擦擦* 提交于 2019-11-30 13:38:32
问题 I just instaled mongo 3. And tried to run it as windows server but receive error The MongoDB 3.0 service terminated with the following service-specific error: Cannot create another system semaphore. Can't find any info about that error and mongodb. 回答1: Check mongodb logs. In my case mongodb could not find directory from mongod.cfg 回答2: In my case it appered to be mongod.lock issue after unexpected shutdown. Detected unclean shutdown - E:\MongoDb\Databases\mongod.lock is not empty. I deleted

Getting the error “The 'VFPOLEDB.1' provider is not registered on the local machine” even after installing and registering the provider

僤鯓⒐⒋嵵緔 提交于 2019-11-30 13:34:43
Alright, so I've got a Windows service that has a FileSystemWatcher that watches an output folder for some Visual FoxPro database files. And it leverages the VFPOLEDB.1 provider to read those files. I cannot go away from this provider because it's being used in production. However, I've never had to support this application before so that's why my development box isn't setup for it. Here is my environment: Windows 7 x64 Visual Studio 2005 .NET 2.0 Windows service so, when I first started getting the error I figured I just didn't have the provider at all, and I was right. So, I downloaded and

The server has rejected the client credentials, WCF as Windows Service

久未见 提交于 2019-11-30 13:24:10
I am able to connect to my WCF service with the Win-form application, however i am not able to do so with my windows service. Whenever i fire open() to the proxy it throws the following error The server has rejected the client credentials Inner Exception: System.Security.Authentication.InvalidCredentialException: The server has rejected the client credentials. ---> System.ComponentModel.Win32Exception: The logon attempt failed --- End of inner exception stack trace --- at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.NegotiateStream

sc.exe config “Service Name” obj= “DOMAIN\\User” password= “password” not working

隐身守侯 提交于 2019-11-30 13:06:41
I want to set password for a service from the cmd. I got the option sc.exe config "Service Name" obj= "DOMAIN\User" password= "password" When I execute, its showing "[SC] ChangeServiceConfig SUCCESS" and if I start the service I am getting "Windows could not start the service1 service on Local Computer. Error 1069: The service did not start due to a logon failure." I searched and got the below link Using SC.exe to set service credentials password fails My password doesn't consist of special character. What's the option to do that? The first thing to check is if that user has permission to Log

Possible to give “Network Service” on one computer permission to a directory on another computer?

可紊 提交于 2019-11-30 12:00:43
I have a file: \\Computer1\Share\file.pdf and I need to open in using a service running as the network service account on another computer: Computer2\NETWORK SERVICE FWIW, Both Computer1 and Computer2 are on the same domain Domain1 Is it possible to accomplish this task? Joe U Yes. If both servers are on the same domain then you can enable access to the share for Domain1\Computer2$ (where Computer2$ represents Network Service on Computer2). If it were me, I'd use a domain account to run the service and grant that same domain account the appropriate permissions on the remote computer. I don't

How to install a windows service from command line specifying name and description?

感情迁移 提交于 2019-11-30 11:57:53
I created a Windows service with Delphi for a client server application. To install it I use c:\Test\MyService.exe /install (or /uninstall) This installs the service and in Windows services it lists with "MyService" name and empty description. How to define a different name and insert a description (to be seen when running services.msc )? Note: I need this because on the same machine i need to install more times the same service (1 per database). Currently the only workaround i foudn is to rename the service exe, but I'd prefer to find out the correct command line way to do it (since I do this

How to configure Hudson and git plugin with an SSH key

拥有回忆 提交于 2019-11-30 11:26:46
I've got Hudson (continuous integration system) with the git plugin running on a Tomcat Windows Service. msysgit is installed and the msysgit bin dir is in the path. PuTTY/Pageant/plink are installed and msysgit is configured to use them. When I run a job that attempts to clone the git repository I get the following error: $ git clone -o origin git@hostname:project.git "e:\HUDSON_HOME\jobs\Project Trunk\workspace" ERROR: Error cloning remote repo 'origin' : Could not clone git@hostname:project.git ERROR: Cause: Error performing git clone -o origin git@hostname:project.git e:\HUDSON_HOME\jobs

System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security

好久不见. 提交于 2019-11-30 11:12:06
问题 I am trying to create a Windows Service, but when I try and install it, it rolls back giving me this error: System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security. I don't know what this means - my application has the bare minimum since I am just testing things out first. My Installer Code: namespace WindowsService1 { [RunInstaller(true)] public partial class ProjectInstaller : System.Configuration.Install

Can a Windows service stop itself?

只愿长相守 提交于 2019-11-30 11:09:41
I have a Windows service whose startup type is automatic, but I want to do some checks when the service starts, and have the service stop automatically if these checks fail. How can I do this? My service is written in C#. You can call the Stop method on your ServiceBase class. See msdn for more details. You can use ServiceController and call .stop. ServiceController sc= new ServiceController(service); sc.Stop(); 来源: https://stackoverflow.com/questions/11770206/can-a-windows-service-stop-itself