windows-services

Access Denied when executing Process.Start from Windows Service

混江龙づ霸主 提交于 2019-12-09 17:59:06
问题 I'm trying to run a process from the service as another user. Process.Start(applicationPath, params, account, SecureStringPassword, ""); A service is running under the "Local System" account. The account parameter is a string like "WORKSTATION6\Tester". This user is a member of the Administrators group. "Application Path" refers to Program Files, so every user can read from it. But I have an "Access Denied" Exception every time I try to start the process. What can you advice? 回答1: There is an

Host Web API as Windows Service using OWIN

不羁的心 提交于 2019-12-09 15:34:13
问题 I'm trying to run a Web API application as a Windows Service using OWIN. However, I get the following message, when trying to start the service: The [ServiceName] service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs. For some reason my service doesn't understand that it should keep listening to http://localhost:9000 The VS solution consists of two projects: The Web API and the Windows service. In the Windows

Console.Out and Console.Error race condition error in a Windows service written in .NET 4.5

不羁岁月 提交于 2019-12-09 15:20:11
问题 I have hit a weird issue in production with a windows service hanging randomly and would appreciate any help with the root cause analysis. The service is written in C# and is deployed to a machine with .NET 4.5 (although I am able to reproduce it with .NET 4.5.1 as well). The error reported is: Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread

Restart a service with dependent services?

两盒软妹~` 提交于 2019-12-09 15:18:32
问题 Starting with a csharp-example and duly noting related SO questions ( Restart a windows services from C# and Cannot restart a Service) and various other questions relating to restarting just one service , I'm wondering what the best method is for restarting a service with dependent services (e.g. Message Queuing , on which Message Queuing Triggers depends, or IIS , on which FTP Publishing and World Wide Web Publishing depend). The mmc snap-in does this automagically, but the code doesn't seem

installutil completes successfully but service is not installed

社会主义新天地 提交于 2019-12-09 14:07:13
问题 I am trying to install a windows service. running c:\windows\microsoft.net\Framework64\v4.0.30319\InstallUtil.exe c:\foo\MyAssembly.exe i get a nice message that all phases (install, commit) completed successfully. (i do not get prompted to enter service credentials) afterwards i do not see the service in services console. nothing useful in install log. the solution is built on a 64bit box, and i am trying to install the service on a 64bit machine. however, i do not see 64bit as an option in

debugging windows service gives No symbols have been loaded message

三世轮回 提交于 2019-12-09 13:46:11
问题 I have a Windows service and I have written Debugger.Attach() in the Onstart method of the service. When I start the service I get a popup which asks to select the debugger instance. When I select and press ok, the visual studio comes into focus but shows me "No symbols have been loaded" message. 回答1: I followed two steps 1.from here http://geekswithblogs.net/dbutscher/archive/2007/06/26/113472.aspx While debugging in Visual Studio, click on Debug > Windows > Modules. The IDE will dock a

Windows services with windows forms in the same process

折月煮酒 提交于 2019-12-09 12:22:42
问题 I have a c# application that runs as a windows service controlling socket connections and other things. Also, there is another windows forms application to control and configure this service (systray with start, stop, show form with configuration parameters). I'm using .net remoting to do the IPC and that was fine, but now I want to show some real traffic and other reports and remoting will not meet my performance requirements. So I want to combine both applications in one. Here is the

all python windows service can not start{error 1053}

江枫思渺然 提交于 2019-12-09 10:54:03
问题 all python code service can install but cannot start Error 1053: The service did not respond to the start or control request in a timely fashion". since my service can install and start in my server . i think my code has no problem. but i still wonder is there a solution that i can solve this error in code my service: import win32serviceutil import win32service import win32event import time import traceback import os import ConfigParser import time import traceback import os import utils_func

Finally is not executed when in a Thread running in a Windows Service

拈花ヽ惹草 提交于 2019-12-09 08:08:58
问题 Can anyone explain why this finally block is not executed? I have read posts about when to expect finally block not be executed, but this seems to be another case. This code needs TopShelf and log4net. I am running .net 4.5 I guess it must be the Windows Service engine that kicks in on unhandled exceptions, but why is it running before the finally block has finished? using log4net; using log4net.Config; using System; using System.Threading; using Topshelf; namespace ConsoleApplication1 {

How do I change the name of my Windows service?

…衆ロ難τιáo~ 提交于 2019-12-09 07:28:38
问题 I have a Windows Service and want to change the name of it (as it appears in the Services application). But I'm unsure of the correct way to do so. It appears to be the ServiceName property and searching through my solution I found this: namespace SI.AService.AService { partial class AService { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param