Web method

Posted by Learner under ASP.NET on 12/16/2008 | Views : 1612 | Status : [Member] | Replies : 1
Somebody ask in an interview regarding web methods.He asked how will you hide web methods like If I have one web method named M1 and there are two clients P1 and P2 who are accessing it but I want P1 can access that M1 but P2 not.How will you do that?

Please answer this.


Posted by: Vuyiswamb on: 12/16/2008 [Member] [MVP] [Administrator] NotApplicable

When you say Web Method, i think you are refering to a Web Service. A Web Method can be called by the Client. Now the only way to authonticate that a Client must call a correct method , you must make sure that you are calling a Correct method. e.g i have a Data Layer that has a Function Getdata() and this is a webmethod. and i have a two Clients Administrator and Users , Now lets say the Users should not Call the Getdata() method, then what you should so is to make sure that that the Fuction gets called from the Client that is Correct.

Thank you for posting at Dotnetfunda

Learner, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response