473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Getting information BACK from a .NET Windows Service

Tom
I am writing a Windows service in VB.NET... I am using two applicatons
- the actual service, and then an additional 'control app' (Windows
Forms) that can be used to stop, start, monitor, etc the service.

Using the ServiceController class, I see that it is easy to get a
limited amount of information INTO a service (such as using Custom
Commands). Now let's reverse that - How does one get information OUT of
a Windows service? For instance, I may want it, during the timer event,
to tell me something it did, or pass me back some more information.
('me' being the monitor Forms app, if it is running). This would be
easy in a full Windows Forms app - simply use events; however, that is
not going to work with a servic application.

So how does one get info out of a service application? I know it can be
done because I have seen it done with apps like VNC, SQL Server
Monitor, etc.

I've searched around Google but found nothing useful. Any ideas
appreciated. Thanks in advance.

Tom
Nov 21 '05 #1
1 1579

This can be done with Remoting ,,,,only in this case instead of connecting
to a remote interface you connect to the local application host ( wich can
be hosted in the service )

MSDN Remoting info

http://msdn.microsoft.com/library/de...ngoverview.asp

article wich shows event handling ( with example code )

http://www.developer.com/net/vb/article.php/3487111

regards

Michel Posseth [MCP]

"Tom" <to*@nospam.com> wrote in message
news:Oa**************@TK2MSFTNGP12.phx.gbl...
I am writing a Windows service in VB.NET... I am using two applicatons
- the actual service, and then an additional 'control app' (Windows
Forms) that can be used to stop, start, monitor, etc the service.

Using the ServiceController class, I see that it is easy to get a
limited amount of information INTO a service (such as using Custom
Commands). Now let's reverse that - How does one get information OUT of
a Windows service? For instance, I may want it, during the timer event,
to tell me something it did, or pass me back some more information.
('me' being the monitor Forms app, if it is running). This would be
easy in a full Windows Forms app - simply use events; however, that is
not going to work with a servic application.

So how does one get info out of a service application? I know it can be
done because I have seen it done with apps like VNC, SQL Server
Monitor, etc.

I've searched around Google but found nothing useful. Any ideas
appreciated. Thanks in advance.

Tom

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom Leylan | last post by:
I'd like to find/have a discussion about the various ways an application server could be implemented. So the upsides and downsides can be discussed. In case I'm using the term wrong by "app...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
2
by: William Gower | last post by:
I am trying to display a page that has a data grid on it. I get this message Description: An error occurred during the processing of a configuration file required to service this request....
9
by: Microsoft News Server | last post by:
Hi, I am currently having a problem with random, intermittent lock ups in my ASP.net application on our production server (99% CPU usage by 3 threads, indefinately). I currently use IIS Debug...
3
by: Grant Schenck | last post by:
Hello, I have a Windows Service developed in C# .NET. I'm making it a remote server and I can, via an IPC Channel, expose methods and call them from a client. However, I now want my remoted...
2
by: Jaye | last post by:
I have facing a difficult problem about windows service I have created a windows Service and I have add some set/get method to return the value that caluate in background. And i have another...
7
by: Brian | last post by:
hello Gentlemen, been trying to get a shell program working where I have a Windows service that also has a Notification icon in the system tray..... I got this idea from microsofts Visual...
0
by: JohnP | last post by:
Hi all Does anyone know the best way to get feedback from a Windows Service? I have written a Windows service which uses a class library (a DLL) which has a timer which does some operations...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.