I search it from other friend, but I cannot work too and have message no permission to access this web service.
Code:
private void button1_Click(object sender, EventArgs e)
{
try
{
Uri uri = new Uri("http://localhost:8080/qcbin/authentication-point/authenticate");
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
request.Method = "POST";
NetworkCredential credentials = new NetworkCredential("user", "password");
request.Credentials = credentials;
WebResponse v = request.GetResponse();
Stream rStream = v.GetResponseStream();
StreamReader str = new StreamReader(rStream);
if (str.EndOfStream != true)
{
richTextBox1.Text = str.ReadToEnd();
}
v.Close();
rStream.Close();
str.Close();
richTextBox1.Text = "success";
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK);
}
}