Service and Client

J

Jeff Williams

I need to develop an application that runs as a service. Easy there are
samples on how to do this.

I need to have a client which updates information for the service. Easy
to do.

How do I notify the Service that details have been changed by the Client
and the Service needs to re-read the data and update its self.

I would like this to work on a single PC but must consider that I may
need the client running on several PC's with the service on a server.

I would like to send a message from the client(s) to the service and the
service reload the data at a predefined times.

Regards
Jeff
 
A

Alberto Poblacion

Jeff Williams said:
I need to develop an application that runs as a service. Easy there are
samples on how to do this.

I need to have a client which updates information for the service. Easy
to do.

How do I notify the Service that details have been changed by the Client
and the Service needs to re-read the data and update its self.

From the Client, use the ServiceController class which has a method
called ExecuteCommand that lets you send an integer to the server.

On the server, override the method OnCustomCommand, which will fire when
the client sends the ExecuteCommand.
 
M

Moty Michaely

I need to develop an application that runs as a service. Easy there are
samples on how to do this.

I need to have a client which updates information for the service. Easy
to do.

How do I notify the Service that details have been changed by the Client
and the Service needs to re-read the data and update its self.

I would like this to work on a single PC but must consider that I may
need the client running on several PC's with the service on a server.

I would like to send a message from the client(s) to the service and the
service reload the data at a predefined times.

Regards
Jeff

Dear Jeff,

You can use any IPC mechanism such as named pipes, Remote procedure
calls etc.

Since you want to consider IPC over network, I would suggest using Web
Services Enhancments messaging technique (using for instance the the
soap:tcp protocol).

Refer to this article on WSE:
http://msdn2.microsoft.com/en-us/library/ms977323.aspx

Feel free to ask any questions regarding IPC or WSE.

Moty
 
W

Willy Denoyette [MVP]

Jeff Williams said:
I need to develop an application that runs as a service. Easy there are
samples on how to do this.

I need to have a client which updates information for the service. Easy
to do.

How do I notify the Service that details have been changed by the Client
and the Service needs to re-read the data and update its self.

I would like this to work on a single PC but must consider that I may need
the client running on several PC's with the service on a server.

I would like to send a message from the client(s) to the service and the
service reload the data at a predefined times.

Regards
Jeff



When both client and the service are .NET applications, you should take a
look at Remoting (Framework V2) or WCF (Framework V3). Consider using the
IPC channel for local connections (same box) and the TCP channel for LAN
connections.

Willy.
 

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