How To Limit Only Subscribed Users To Web Methods In Web Service?

blurgal

Member
Joined
Sep 24, 2005
Messages
9
Programming Experience
Beginner
Dear friends,
I have been given a task by my lecturer. I have built a simple web service called MathService. This MathService has 3 web methods that are addition, subtraction and multiply.
My lecturer wants me to limit the access of this web methods to only subscribed users. This means that if user A subscribed to the MathService he can then access all the three web methods. If a User B never subscribed to the MathService he is limited to use only one web method that is the addition web method.

I really have no idea how to do it. Can anyone please guide me please? I have read and searched online. But no info teaches me how to do it. Please anyone help me.. I need to know how to do this urgently. Any coding samples?

Thnx
emotion-42.gif
emotion-24.gif
 
In a nutshell, when the webservice is initiated, somekind of client identifier needs to be sent with it too. This identifier is then used by the web service to determine subscription levels. If the client ID doesn't allow for the requested web service, an error needs to be generated and sent back. If the client ID does have the appropriate permissions, then the requested action is performed and results are sent back.

-tg
 
If you prefer some advanced authorization technique which will cenrtainly surprise your lecturer you should have a look at the implementation of WSE 2.0 SP3 (currently WSE 3.0 in bèta) published by Microsoft. this is an extension to the SOAP protocol with security as main principal in mind. It is harder though! If you want to keep it simple you could use a Soap Header or perhaps session token system.

If you want to take a look at WSE I advise you to use WSE 2.0 SP3 instead of the new but yet hard promoted WSE 3.0. Just because it's still under development.

WSE information --> http://msdn.microsoft.com/webservices/webservices/building/wse/default.aspx
 
Back
Top