windows-services

running multiple instance of mongod as service

China☆狼群 提交于 2019-12-11 11:24:23
问题 i try to start multiple Instance of MongoDB as a Service. Under the commandline i can start more than one Mongo Instances, for the first instance i append "--install" to the Command and now it run as service. But now i try to append "--install" to the second Instance and get a Error: first command runs well: c:\data\bin\mongod --nohttpinterface --port 27201 --dbpath c:\data\cluster\db1 --master --logpath c:\var\log\mongodb_db1.log --serviceName MongoDB_1 --install but the second one gives a

System.Speech throws “No voice installed on the system or none available with the current security setting” exception in Windows Service

女生的网名这么多〃 提交于 2019-12-11 11:23:43
问题 Long time reader, first time poster. I'm developing a Windows Service in C# .Net 3.5 to perform Text to Speech operations. I'm using System.Speech (Microsoft Speech API 3.x). I deployed the service to a Win2008 x64 server and it's now throwing the following exception: System.InvalidOperationException: No voice installed on the system or none available with the current security setting. at System.Speech.Internal.Synthesis.VoiceSynthesis.Speak(Prompt prompt) at System.Speech.Synthesis

Windows service setup project doesn't copy referenced dlls

允我心安 提交于 2019-12-11 11:06:39
问题 I've just built a windows service and it runs like a dream in debug/release on my dev machine. I've created a setup project following steps in walkthroughs such as this blog post, this msdn walkthrough, and this generous answer to a rather lazy SO question. My project installs fine on a target machine, but when I run it, the timer ticks but nothing happens. When investigating this I noticed that the installer doesn't seem to have copied over a couple of dlls with it that are referenced in my

Are Windows-GUI calls (creating visible windows, etc.) allowed in a Windows-Service?

↘锁芯ラ 提交于 2019-12-11 11:05:15
问题 First off, I know some proper ways of making a truly interactive Windows Service. The situation is, I do have a tool that does not interact with the user as such. However, it does display non-blocking notifications both via popup windows and via the Windows Notification Area (aka System Tray). It also writes a logfile of the notifications it displays. This tool is normally spawned by a main user application and as long as the main application is a normal application, these notifications do

Close a child process from a windows service

戏子无情 提交于 2019-12-11 10:41:45
问题 I've written a service in c# that starts different other (child)processes which run in background. How can I close a process in a graceful way? Process.kill() is not an option, and Process.CloseMainWindow() does not work because the child process has no visible window (and shouldn't have any) . Tanks for your help. 回答1: If you control that other process you can use WCF to communicate between processes, child process should check and ask service if is time to end process and then child process

How to use named mutex and shared memory between a windows service and a process?

自闭症网瘾萝莉.ら 提交于 2019-12-11 10:35:45
问题 I'm have a code written in C++\MFC that is run as a Windows Service and a (normal) C++\MFC Windows process - now I wish to communicate between the two using named Mutex and Shared memory (File mapping). How is that possible ? 回答1: It depends on your communication requirements. Generally the service creates the mutex and shared memory and the clients open them and do stuff. OutputDebugString() is a classic example of IPC using a mutex and shared memory (and some events). Here is a detailed

Multi threaded Windows service to process Windows Message Queue

萝らか妹 提交于 2019-12-11 10:29:13
问题 This is my first attempt at writing a Windows service. This windows service has to process 2 windows message Queues. Each Message Queue should have there own thread, but I can't seem to get the Architecture in Place. I followed this Windows Service to run constantly which allowed me to create one thread in which I am Processing one Queue. So this is my service class: protected override void OnStart(string[] args) { _thread = new Thread(WorkerThreadFunc) { Name = "Address Calculator Thread",

Windows services's OnStop() method does not get called

被刻印的时光 ゝ 提交于 2019-12-11 10:26:14
问题 I have written a Windows service in C# to log all user logons and logoffs, and save them in a table on a server. I have used a while loop with true condition and check the system's current user every minute in this loop, so my service goes to ' Starting ' status when i turn on my system. Everything goes fine up to here, but the problem is that the OnStop() method does not get called when I shut down my system. I know that the problem is about the status of the service when it starts, because

C#: How to use Google Calendar API in a Windows service

≯℡__Kan透↙ 提交于 2019-12-11 09:14:56
问题 I'm trying to build an application for retrieving calendar events from Google Apps Calendar. I followed the steps on the following page which worked to a certain extend. https://developers.google.com/google-apps/calendar/quickstart/dotnet The problem is, that this code doesn't work, when the application runs as a Windows service. The problem seems to be, that the code runs asynchronous and uses UserCredential. The application only works, if it is being run as a user. Even if I manually run

best way to access a windows service via GUI

夙愿已清 提交于 2019-12-11 09:09:47
问题 I'm curious about the best way for a C# gui to access the functions of a Windows Service, be it WCF or ServiceController or some other option. I'll explain what I'm doing: on a regulated time interval the service will be zipping one hours worth of datafiles from location A and sending the zipped file to location B, this will be done in the background 24/7 or until the service is stopped by the user and runs even when no one is logged in (hence the need for service) I would like the user to be