Reg: Webservice Access

  • Thread starter Thread starter rvn
  • Start date Start date
R

rvn

In a web service suppose i want to expose only few methods to a company like ABC and all the methods to another company like XYZ. then how this can be done.

Any help is highly appreciated.

Thanks in Advance
Rvn
 
In a web service suppose i want to expose only few methods to a company like ABC and all the methods to another company like XYZ. then how this can bedone.

Any help is highly appreciated.

Thanks in Advance
Rvn

Check out SOAP Header authentication. You can apply user name and
passwords to individual methods in the same .aspx page.

EX.

public class Service : System.Web.Services.WebService
{
public AuthHeader Authentication;

public Service()
{
}

[WebMethod]
[SoapHeader("Authentication", Required = true)]
public void MyMethod()
{
if (Authentication.Username == "the username" &&
Authentication.Password == "the password")
{
//Do Stuff.
}
}
}

You'll have to incorporate sending the username and password in the
client's SOAP request which is also easily done in .NET.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top