473,569 Members | 2,555 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Communication Between Service and Form Application

Would any kindly tell me if its possible to communicate between a service and
a form application. For example, retrieve information from the service, like
current activity or progress of its operations. In particular, I would like
to to monitor more than just whether a service is running. In the system tray
I would like to display whether the service is idle, or running a particular
method.

Is this possible? If so, should I be using MSMQ, or something else?
Nov 16 '05 #1
3 10882
Hi,

Look at this article which shows how to communicate between a client
application and windows service. It uses Custom commands to communicate with
windows service.

<http://msdn.microsoft. com/library/default.asp?url =/library/en-us/dnvsm02/html/vs0201dt.asp>

Hope it helps...

Regards,
Madhu

Microsoft C# MVP | MCSD.NET

"BizzyTalki ng" wrote:
Would any kindly tell me if its possible to communicate between a service and
a form application. For example, retrieve information from the service, like
current activity or progress of its operations. In particular, I would like
to to monitor more than just whether a service is running. In the system tray
I would like to display whether the service is idle, or running a particular
method.

Is this possible? If so, should I be using MSMQ, or something else?

Nov 16 '05 #2
Yes, I have taken a look at the custom commands, and have been successful in
sending a command to the service. All that I need to do now, I guess, is
find a way of using Remoting to talk back to the application.

Either that, or use a database, which I have to say, is not my preferred
choice for this particular problem.

Thanks for your guidance.

"Madhu[C#-MVP]" wrote:
Hi,

Look at this article which shows how to communicate between a client
application and windows service. It uses Custom commands to communicate with
windows service.

<http://msdn.microsoft. com/library/default.asp?url =/library/en-us/dnvsm02/html/vs0201dt.asp>

Hope it helps...

Regards,
Madhu

Microsoft C# MVP | MCSD.NET

"BizzyTalki ng" wrote:
Would any kindly tell me if its possible to communicate between a service and
a form application. For example, retrieve information from the service, like
current activity or progress of its operations. In particular, I would like
to to monitor more than just whether a service is running. In the system tray
I would like to display whether the service is idle, or running a particular
method.

Is this possible? If so, should I be using MSMQ, or something else?

Nov 16 '05 #3

"BizzyTalki ng" <Bi**********@d iscussions.micr osoft.com> wrote in message
news:66******** *************** ***********@mic rosoft.com...
Would any kindly tell me if its possible to communicate between a service and a form application. For example, retrieve information from the service, like current activity or progress of its operations. In particular, I would like to to monitor more than just whether a service is running. In the system tray I would like to display whether the service is idle, or running a particular method.

Is this possible? If so, should I be using MSMQ, or something else?


MSMQ is a bit of overkill for what you are looking for - and if your
organization is not already committed to message queuing, it can be a bit
messy trying to get it installed on all potential client workstations.

Remoting does not solve your problem - the remote instance will run is
process A, the service runs in process B - you still have the problem of
process A communicating with Process B.

The link that Madhu provides is OK if you want to communicate with the SCM -
but that does not allow you to communicate with a particular service.

Your service runs in a separate process and to communicate directly with
your custom service you need interprocess communication. There are numerous
technologies available (sockets, shared memory, message passing, named
pipes, plus others). If you want to communicate with a service on another
machine, your options become a bit more restricted. For LAN scope
monitoring, I would tend towards sockets - .Net has good support for
sockets, and performance is fair. Consider a broadcast datagram to locate
the service, then switch to a connected stream type socket to communicate
directly with the service.

regards
roy fine
Nov 16 '05 #4

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

Similar topics

4
4953
by: Viper Venom | last post by:
Dear All: I am trying to write an application that consist 2 executables 1) Server.exe 2) Client.exe I start the server.exe first and then start the two client exe by code and kill both of the client when the server exit (This is already done)
7
1735
by: [Gauthier] | last post by:
Hello, I've a simple question: On a server that run multiple asp.net HttpApplication, is there any way with the asp.net framework to exchange data between different application? I basically need to send message to a 'server wide' application from any HttpApplication on the same server and obtain responses (wich may be simple strings or...
4
1224
by: zurg | last post by:
Hi! Is there any easy way to send a command(or a number/whatever) to a running application? That's the situasion: I wrote a windows service and installed it on the computer. And I wrote a normal program that starts this service and send some commands to it (by ServiceCommandManager) and the service does something... Now I need to send a...
5
8461
by: Brian Patrick | last post by:
I have an application model which will consist of a front-end configuration application, which needs to control the state of a back-end vb.net windows service (which is the component that does all the work). Think of this in the same manner as say microsoft management console and the w3svc (inetinfo) service. What should the standard...
21
1928
by: dast | last post by:
Hi, I'm having trouble letting my background thread tell my main thread what to do. I'm trying to tell my main thread to open a form, but when my background thread ends, the form that I thought my main thread had opened disappears. Obviously there's something that I don't understand here. The background thread is run in another class...
3
1858
by: Markus R. | last post by:
Hi, we are about to design an 3-tier web application. The web server (presentation layer), the application server and the database systems will be on separate physical machines. My question is about the communication between the web server and the application server. I know two .NET builtin ways to manage this communication. We could...
15
4751
by: Angelo | last post by:
Hi all, I'm using a FileSystemWatcher to monitor a directory. I want the FSW to pop up my already instantiated but invisible form. However, I'm running into some problems with this. 1) In the FSW.Changed FileSystemEventhandler, I called the Show method 'frmMain.Show( )' on my form, the form appears but not completely painted and it...
9
3717
by: JB | last post by:
Hi All, I have a VB.NET application that constantly executes queries through ODBC connections. The application consists of a simple Form type UI where the query parameters can be edited, and a simple scheduler that executes the queries. The application works fine as "standalone" but it now needs to be installed on a server and left running...
5
3635
by: Lawyno | last post by:
Hi there, we are creating some automated backup solution for some user application (let's say "UserApp" ;)). Now, the backup service is working perfectly. But there's a problem: the backups cannot be created if some user is working with the "UserApp" at the same time, because of locked files, etc. So the service should be able to tell the...
0
7701
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.