I have a webservice e.g.
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class SI_C : System.Web.Services.WebService {
public SI_C()
{
//Uncomment the following line if using designed components
//InitializeComponent();
}
[Webmethod]
public bool CreateRecord(classname objname) //some class I am setting the data to
{
//Creates a record.
}
}
Now while consuming at client side I created
SI_C_In_SoapClient client = new SI_C_In_SoapClient("SI_C");
client.ClientCredentials.UserName.UserName = "Username Sent";
client.ClientCredentials.UserName.Password = "Passport Sent";
Now I want to access this sent password and username in my webservice. How would I do that?
Update:
- Set the password and username at client side using network credentials call
- Receive that in webservice
- Send to database and check if ok? That's it.