windows-services

How do I install a windows service that runs as an administrator?

不羁岁月 提交于 2019-12-07 09:16:34
问题 I've written an installer that installs a windows service (A) that needs to start/stop another service (B). However, when A tries to start/stop B, I get this exception: System.InvalidOperationException: Cannot open MyService service on computer '.'. ---> System.ComponentModel.Win32Exception: Access is denied The installer installs the service as a local service, and it requests admin rights via the UAC pop-up, which I grant. I've also added an app.manifest file to the service that is set to

WIX ServiceInstall - setting the service to run under the NetworkService account

吃可爱长大的小学妹 提交于 2019-12-07 09:16:27
问题 I am trying to create a WIX installer to install my windows service to run under the NetworkService account and getting an Insufficient Priviledges error during the installation. I found this post where someone seems to be experiencing the same problem but no real solution was offered: http://n2.nabble.com/Re-WiX-users-Digest-Vol-40-Issue-129-td3782055.html I'm sure someone must have acheived this previously and wondered if they'd be kind enough to share a code snippet? 回答1: NOTE: The answer

Topshelf timeout issue

别说谁变了你拦得住时间么 提交于 2019-12-07 07:51:21
问题 We are using Topshelf to host a service. Before starting the service, we are making database call to load lot of data. Because of this, while starting the service, we are getting following error: Start Service failed with return code '[7] ServiceRequestTimeout We are using following code to start the service: HostFactory.Run(x => { x.Service<AppService>(s => { s.ConstructUsing(name => new AppService(s_resolver, baseAddress, resolver)); s.WhenStarted(svc => svc.Start()); s.WhenStopped(svc =>

Monitor the performance of individual window service

你说的曾经没有我的故事 提交于 2019-12-07 05:45:14
问题 I have 7 windows services. i want to monitor the performance of the individual services like the processor usage, memory usage etc. If i use perfmon, it gives for the entire system but not the individual services. Can anyone please suggest how do i monitor the performance of individual services? 回答1: Perfmon can monitor individual processes! Just chose process in "Add counters/Performance objects" combo. For "quick" monitoring I have found that Sysinternals (now Microsoft) Process Explorer is

Can you run a “service” that runs a scheduled task from an ASP.Net project?

孤街醉人 提交于 2019-12-07 05:38:42
问题 I built a Windows Service for a client of ours that collects all the changed/new rows from the database, turns them into a CSV and FTP uploads them somewhere every night. Now as it turns out they don't have access to install or run a Windows Service (it's a web path only hosted solution). I thought it would be easy enough to modify the Windows Service code to run inside the ASP.Net process and instantiated from the Global.asax (I've done this in the past, hosting a WCF service from within a

Create a windows service in vb6

喜夏-厌秋 提交于 2019-12-07 05:28:18
问题 Is it possible to create a windows service in vb6? if yes, how? 回答1: I've never tried it, but Desaware offer a commercial package, the NT Service Toolkit that claims to allow you to host a VB6 DLL inside a Windows Service. Desaware was founded (and I think is still owned by) VB6 guru Dan Appleman, which is a good recommendation. 回答2: Microsoft created a control to allow you to create services in VB6. http://support.microsoft.com/default.aspx/kb/170883 http://support.microsoft.com/kb/175948/EN

Log4Net with WCF Running As Service

杀马特。学长 韩版系。学妹 提交于 2019-12-07 04:14:21
问题 I am running a WCF Service as Windows Service. I am having trouble getting log4net to do any actual logging In what app.config should I place my configuration code for log4net. The Service Host app.config the Service app.config or the underlying methods that the Service Calls? -b 回答1: I've run into design issues like this when I was writing my own logging system. An app.config for a dll assembly won't load. The executable for your app/service/etc. is what loads and ignores the dll config. You

How reliable is windows task scheduler for scheduling code to run repeatedly?

眉间皱痕 提交于 2019-12-07 04:05:23
问题 I have a bit of code that needs to sit on a windows server 2003 machine and run every minute. What is the recommended way of handling this? Is it ok to design it as a console service and just have the task scheduler hit it ever minute? (is that even possible?) Should I just suck it up and write it as a windows service? 回答1: Since it needs to run every single minute, I would suggest writing a Windows Service. It is not very complicated, and if you never did this before, it would be great for

Can't connect to Oracle from a windows service (error: ORA-12154: TNS:could not resolve service name (12154) )

安稳与你 提交于 2019-12-07 03:33:58
问题 LATEST Update (Nov 2 2011 9AM) I tried running tnsping from the service and it WORKS! However i still get error 12154 when i try to connect. I'm completely confused now, i can't understand how tnsping could work fine but the connection is unable to resolve the service name. For some reason when i run the following code from a windows service (on a timer event) I get the error: ORA-12154: TNS:could not resolve service name (12154) When i run the exact same code from a windows form app, it

Windows 7 bat file not starting as a service

六眼飞鱼酱① 提交于 2019-12-07 03:22:48
问题 I'm running a Windows service which starts a simple bat-file during start up, but the service won't start. If I try run it manually from the service GUI I get following error message. Error 1053: the service did not respond to the start or control request in a timely fashion This seems to be a common error during service startup, however I didn't find similar problem in the other answers. I created the service from command line with following command C:\Users\Administrator>sc create service