Writing an app to monitor a Windows service

C

Chris Dunaway

I am writing a Windows Service that reads and processes files on a set
schedule. I want to create a second app that can monitor the Windows
service. The Windows service will write trace messages at certain
points while executing. The monitoring app I want to write will be
very simple, just picking up these traces and displaying them to show
progress of the service.

My question is what is the best method of communication between the
apps? The monitoring app may be run on the same machine or on the same
network as the service, but not, for example, over the internet.
Should I use named pipes? TCP client/server? Ideally, the service
would somehow be able to detect if there were any "listeners" and only
write the trace messages if any listeners were present.

I was wondering what others have done in this regard and can you
suggest some code or topics I should look at? What would be the best
way to accomplish this?

Thanks
 
C

Crouchie1998

I wrote an application like you described. The Windows application just sat
in the System Tray & then the service would run under local system.

What I looked into before writing this application is remoting & I found
that was the best way to handle this.

Make sure you code security rights for accessing the files for both the
service & the Windows application

I hope this has shed some light on what you need to do.

One last thing: Do something to spoof your e-mail address, otherwise you
will be SPAMMED forever more

Crouchie1998
BA (HONS) MCP MCSE
 
J

JohnFol

Hi Crouchie, how did your windows service "publish" the data? Did it create
a log file to the event viewer / file system or did it "make it availabile"
via remoting?

I'll then presume the Systray app is configured to look at the server the
service is running on.
 
C

Chris Dunaway

Crouchie1998 said:
What I looked into before writing this application is remoting & I found
that was the best way to handle this.

Make sure you code security rights for accessing the files for both the
service & the Windows application
Thanks

One last thing: Do something to spoof your e-mail address, otherwise you
will be SPAMMED forever more

Can you see my full e-mail address? When I look at the post using
Google Groups, it seems to hide part of my e-mail address
automatically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top