windows-services

Windows Server 2008 and jstatd as a service

懵懂的女人 提交于 2019-12-22 06:58:59
问题 I have a JBoss server installed as a service on Windows Server 2008 with Local System as the Log On user. I want to be able to run visualgc on the JBoss server, and prior to Server 2008 I was able to directly connect to the PID (i.e. visualgc [PID]). Based on what I've read, my only solution in Server 2008 is to install jstatd as a service using the same credentials in order to run visualgc remotely (i.e. visualgc [PID]@localhost:1099). So, I got jstatd running as a service under the Local

Windows Server 2008 and jstatd as a service

痴心易碎 提交于 2019-12-22 06:58:29
问题 I have a JBoss server installed as a service on Windows Server 2008 with Local System as the Log On user. I want to be able to run visualgc on the JBoss server, and prior to Server 2008 I was able to directly connect to the PID (i.e. visualgc [PID]). Based on what I've read, my only solution in Server 2008 is to install jstatd as a service using the same credentials in order to run visualgc remotely (i.e. visualgc [PID]@localhost:1099). So, I got jstatd running as a service under the Local

The service did not respond to the start or control request in a timely fashion if Debug dll used

♀尐吖头ヾ 提交于 2019-12-22 06:37:03
问题 I was trying to deploy a windows service on my machine, but when I was trying to start it I got following error. "Windows could not start the 'myService' on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion." After a bit of research I found out that I was complining my project with Debug option, the moment I changed it to 'Release' mode all was good and working. I can not make sense of this behaviour so I searched the net and found

Windows Service start and stop without admin privileges

元气小坏坏 提交于 2019-12-22 05:48:47
问题 How to start and stop window service without having admin privileges? My application launch should start my service same way it has to stop once it is closed. I can do this using "Service Controller " I can install the service with Admin privilege but for starting and stopping the service should not ask admin privileges. Can anybody tell me how I can achieve this using c#? 回答1: I have discovered the way to give a permission to start/stop the service for non admin users. We can provide a group

Msmq and WCF Service

北城以北 提交于 2019-12-22 04:39:09
问题 I have created a WCF service using the NetMsmq binding for which i created a private queue on my machine and executed the project. This works fine as such and my WCF service is started and accesses the message using the queue in the debugging environment. Now, I wanted to host the service using the windows service and for the same I created a new project and windows installer as well (This service runs under Local System Account). Then I tried installing this windows service using the

Do you need to re-install a Windows service after rebuilding

懵懂的女人 提交于 2019-12-22 03:21:42
问题 If I rebuild a Windows Service after making changes, can I just copy and replace the old assembly / .exe files to get those changes to run or do I need to re-install the service? Also do I have to first uninstall the service before installing the new version? 回答1: You don't have to uninstall and reinstall the service since this only adds registry info regarding the executable path and launch options. Just stop the service, copy your assemblies and restart it 回答2: You do not need to uninstall

Cannot open <MyService> service on computer '.'

寵の児 提交于 2019-12-22 01:57:25
问题 I have a website created by C# which is to start a services in a server. I created a services called MyService using this : instsrv MyService %systemroot%\system32\srvany.exe then I uses the following code to call it : ServiceController service = new ServiceController("MyService"); try { service.Start(); } catch (Exception ex) { Response.Write(ex.Message); } but when I access the website and trigger this event, it prompt me Cannot open <MyService> service on computer '.' Is it because of the

Exception handling best practice in a windows service?

半世苍凉 提交于 2019-12-22 01:25:52
问题 I am currently writing a windows service that runs entirely in the background and does something every day. My idea is that the service should be very stable so if something goes wrong it should not stop but try it next day again and of course log the exception. Can you suggest me any best practice how to make truly stable windows services? I have read the article of Scott Hanselman of exception handling best practice where he writes that there are only few cases when you should swallow an

Can a service be started by normal user on Windows?

白昼怎懂夜的黑 提交于 2019-12-21 20:46:36
问题 I have a service application created with Delphi, and managed to install it from another Delphi application using elevated privileges. The service is set to log on as the Local System account (which is default when creating a service application in Delphi). I have another Delphi application in which an ordinary user is supposed to be able to start or stop the above service. My question is: Is this allowed by Windows? When I try to start the service using code in Delphi, it just fails with

Windows Service Hosted TCP WCF Service

断了今生、忘了曾经 提交于 2019-12-21 19:40:51
问题 I am trying to host a WCF service on a windows 2008 R2 server as a windows service. I followed the directions provided by msdn (found here). Everything works fine as long as everything is part of the same solution in visual studio. However, I tried creating a client in a different solution (on the same machine) and it can't find the service. I get an 'Add Service Reference Error' shown below. My goal is to be able to access the wcf service remotely, but I can't seem to even access it locally