I frequently showcase the jhat, jps, and jstack tool set to developers on Linux and Mac. However, a developer recently indicated that these are unusable in Windows if the Java app in question is running as a Windows Service.
A Sun-filed bug says something very similar, but was closed due to inactivity.
I have tested this out for mysel...
I have build a windows service using a timer which is not ideal for what i want to do. I have a methord i want to call and as soon as its finnished i want it to start again and again and again. What is the best way of doing this and can you show me an example.
...
I am writing a windows service that needs to be running 24/7. It is a pretty simple service that monitors a directory where files are dropped into and processes those files. I need to restart the service if an unhandled exception is thrown.
Is there a way for a service to restart itself in the event of an unhandled exception?
...
I created and installed a .NET Windows Service and now that I deleted its executable file I can't remove it from services.msc anymore with
InstallUtil.exe /u executablefilename.exe
How do I remove it?
...
In Windows, is there a way to check for the existence of an environment variable for another process? Just need to check existence, not necessarily get value.
I need to do this from code.
...
I'm developing an application that's going to be implemented as a Windows Service and I was wondering what'd be the best way to deal with the different settings (at User and Application level). The thing is, I'm not completely familiar (yet) with all the available options, so in principle I'm favoring .NET's own System.Configuration (Con...
The service could not be started. The service did not report an error.
I encounter this error whenever I install a windows service project in the command line. It's true that there's an error in my code, but how can I find that error with this kind of error message?
...
Hi,
I have a windows service which has a number of threads that do some work.
All has been going well in testing, until once, where I saw "windows service terminated unexpectedly" in the event viewer.
How do I go about trying to debug where this is happening?
I have exceptions being caught under normal circumstances but not in this c...
I'm trying to restart the service from a remote machine. Here is my code. The problem is that I need to enter startinfo.filename = "sc.exe" since I'm putting "start /wait sc" this is causing an error. Here is my code, any thoughts. Also if anyone has any idea how to keep the cmd window open after this is ran so I could see the code that ...
I have only created regular windows applications (C# mostly). What differentiates a windows service from a regular windows application? What makes them different? What can a service do that an application can't? What are the differences seen from a developers point of view? How do you create one? Is it just to create a regular applicatio...
Hello everyone,
If I know a service name, and have enough permission. My question is how to set a Windows Service to be auto-restart in PowerShell? I am using PowerShell 1.0, OS is Windows Server 2003.
thanks in advance,
George
...
Hello everyone,
I am using PowerShell 1.0 on Windows Server 2003 x64. When executing the following statement, there is error below. Not every time this error occurs, and if this error occurs and I execute this command again, there is no error again! It is so weird. Any ideas what is wrong?
Stop-Service "SQLServerAgent" -Force -ErrorAct...
Hi all,
I've been working on a .Net Windows Service and i was wondering how to implement sending out an email on an error from within the service.
I entertained myself with the idea of sending the email from within a catch block, but then i remembered that there could be an error within sending an email as well and an unhandled exceptio...
So I'm designing a WCF service. I'm unexperienced with WCF, and I'm trying to decide whether it should be hosted in IIS, or a custom Windows service.. Or some other option?
Things to consider:
It needs to load data from a database on startup.
It needs to maintain this data across requests, not load it each time.
It needs to process mu...
Currently to run windowsservice as a fixed user we set the logon properties on the windows service (where we specify the username and password to run as).
but iam willing to have this feature of running the windows service as a fixed user
as impersonation in web application mentioned in the config file.
kindly throw your thoughts on t...
I have written a window service. and I am able to successfully install/run the service. Now I have added a timer to the service and I want to be able to adjust the interval via the registry. But I can't figure out why GetSetting("MyAppName", "MySection", "IntervalSetting") will NOT return the value in the registry!
Am I missing som...
Is there any tool to send (mimic) a windows message like 'WM_ENDSESSION' to a windows service?
OR
How can I send a windows message to a process using C#?
(I know only C#)
EDIT: Purpose: Basically I have to debug a windows service for fixing a bug that occurs only on system shut down.
...
I have created a windows service that has the Account set to user. Which means that when I install the service I need to pass a user name and password. Is there a way to set these maybe in the ProjectInstaller class maybe in the BeforeInstall event? if so HOW?
...
So i've been asked to demo a windows service to customers, but i'm clueless on how to go about doing so.
I've demo'd a web/windows based ap before by just bringing up the application and going through each screen, but with a windows service it isn't the same.
Can anyone point me in the right direction?
All the service does is downloads ...
Hi,
I've created a windows service which is listening to a MSMQ. For each message I receive, some DB transactions need to be made. Later it might be possible that there will be 1 message every second.
Currently the Nhib session is kept open until the service is stopped manually.
Is it a good practice or should I close the session after ...