Click here to Skip to main content
15,892,839 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have WCF service and there are three clients.
I want to show the only 2 method to client 1 and 3 methods to client 2 and 1 method to client 3.
What will be the approach?
Posted
Updated 22-Feb-16 1:48am
v3
Comments
Kornfeld Eliyahu Peter 22-Feb-16 7:37am    
No way...
You can deny execution, but can not hide!
F-ES Sitecore 22-Feb-16 8:35am    
Implement some kind of authentication so only the clients supplying the relevant credentials can access the methods you want them to access. "Hiding" is rarely a valid security mechanism.

1 solution

As Peter said, it's not possible to do this - with a single WCF-service.

But what you could do is this:

- Instead of a single WCF-service have 3 individual WCF-services (one for client 1 with the methods you want to offer to client 1, etc.)

- Don't implement the service-functionality directly in the service methods. Instead have a class that has all the methods your current one-for-all WCF-service has and delegate to these from the service-methods of the three individual WCF-services.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900