By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,441 Members | 1,831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,441 IT Pros & Developers. It's quick & easy.

Service and Client

P: n/a
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
May 11 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Jeff Williams" <je*******************@hardsoft.com.auwrote in message
news:13*************@corp.supernews.com...
>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.

May 11 '07 #2

P: n/a
On May 11, 9:30 am, Jeff Williams
<jeff.williams_NO_S...@hardsoft.com.auwrote:
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

May 11 '07 #3

P: n/a
"Jeff Williams" <je*******************@hardsoft.com.auwrote in message
news:13*************@corp.supernews.com...
>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.

May 11 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.