Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
If i have WCF service and there are three client and 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
Comments
AmitGajjar 10-Dec-13 7:52am    
do you want to restriction on viewing name as well ? or you just want to restrict from execution ?
[no name] 10-Dec-13 8:27am    
Not satisfactory answer, i am looking practical answer.

1 solution

It seems this is an age old issue. Short of using security, it seems you will need to either have three different service interfaces or use security (uid, pwd) and vet in each service method. There is a ton of info answers out there but it comes down to each service method being publically available. I saw one implementation using ASHX but it did not sit well with me.
 
Share this answer
 
v2
Comments
[no name] 10-Dec-13 8:29am    
It looks ulternate solution but not exact one.
Sergey Alexandrovich Kryukov 10-Dec-13 12:10pm    
This is not alternate! This is your question which does not make perfect sense. See the difference? Interface is interface, a fixed type which is ether implemented or not.
More exactly, the solutions is: different interfaces, but inheriting from each other, to have shared members declared only once. That's it.

Mike gets my vote of 4, your question: 1. :-)
—SA
[no name] 11-Dec-13 3:31am    
Sergey, My question is very straight. I just wanted to know if there is any possibility or work around.
Sergey Alexandrovich Kryukov 11-Dec-13 10:37am    
It just makes no sense, hiding a member of the interface.
Nevertheless, we already told you a sensible workaround. Create thee different interfaces by inheriting from some common-part interface(s). Share the implementation of common part.
—SA

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