I'm trying to create a web service client with C# in VS 2005.
As a test I create a small program that can send out web service request,
but some reason I'm getting Authentication Failure.
I'm suspecting that the Credential function is the problem, but not sure.
I captured packet, but there wasn't any user name or password are sent to
the service atleast in plain text.
If you know how to resolve this problem, please let me know.
private void TestBtn_Click(object sender, EventArgs e)
{
string result="";
// TransmittalHeaderBinding is proxy object created by wsdl.exe
TransmittalHeaderBinding thb = new TransmittalHeaderBinding();
thb.Credentials = new NetworkCredential("xxxxx", "xxxxx");
setReviewerName RName = new setReviewerName();
RName.reviewerName = "AAAAAAA";
RName.aaaaTrackingNumber = "AAAAA";
try
{
//Requesting web service
result = thb.setReviewerName(RName);
}
catch (Exception Eerror)
{
AAAAAMessageBox.Text += Eerror.ToString();
}
AAAAAMessageBox.Text += result;
}