Reputation: 397
For instance, I have a WCF service that serve clients. Sometimes I should send some commands to that service to get some results. For example, if it's necessary to ban some client I would send some command like "ban John Doe" and service will add user named "John Doe" to ban list. How can I implement that? Should I use named pipes or something like that? Probably I should manage service from machine where service is running. Service is hosted in standalone console application. Thanks in advance!
Upvotes: 0
Views: 530
Reputation: 59131
Create multiple services that access the same datastore. One for clients, and one for administration.
Why?
See: http://en.wikipedia.org/wiki/Interface_segregation_principle
How?
Use a database, and connect to it from both services. Something with a small footprint like SqLite might work if you don't already have a DB.
Bindings:
Named pipes might be a good idea for your binding since they aren't network accessible. Here is a tutorial:
But check out this question before you make the leap:
If that seems too risky, you could use net-tcp instead:
Upvotes: 0
Reputation: 2275
It's possible with do this with Code
just you Need to do these step`s:
Notify self
on service(add property to all method as Name or Id) ClientList
ban Client
From That Listclient Doesn't exist
in list, simply return none value for any MethodUpvotes: 1