Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
hi
thanks for advance help

in my wcf service i have 10 methods i want to give my client to access 5 methods only.
Posted

Make those methods "internal".


(30-character minimum made me add this text)
 
Share this answer
 
Bear in mind that you expose methods via a contract. If you do not want people to have access to 5 of those methods, just expose a contract that has the remaining 5 methods and use that instead.

You can have exactly the same code in place implementing the contracts, as long as the two interfaces are similar enough that they satisfy your needs. In other words, as long as the signatures/names of the methods are the same in the two interfaces, the same concrete class can be used.
 
Share this answer
 
Comments
Kunal Chowdhury «IN» 21-Aug-10 9:17am    
Reason for my vote of 5
Correct Answer
Nish Nishant 21-Aug-10 10:29am    
Reason for my vote of 5
Proposed answer.
Hi,

Just to add to Hanlon's explanation....

IExternal
{
//5 methods declaration
}


IInternal
{
//5 Internal methods declaration
}


Service : IExternal,IInternal
{

}



Expose the IExternal....


I hope this helps!.

Regards,
-Vinayak
 
Share this answer
 
Comments
Nish Nishant 21-Aug-10 10:29am    
Reason for my vote of 5
Proposed 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