Reputation: 3899
I want to create a web service which has 2 methods and should be accessed by 2 clients. 1. First client should be able to access both the methods. 2. 2nd client should be able to access only one method.
How can I achieve this?
Upvotes: 0
Views: 398
Reputation: 862
For 2nd Method add 1 more parameter (authenticationKey) and if key math then return data else show message Invalid key.
public string Method2(int ClientId, string authenticationKey)
{
if(authenticationKey == "CSCdk33792")
{
...
}
else
{
return "Invalid authenticationKey";
}
}
Upvotes: 2