A
ad
I have a WebService in localhost, and the set in the web.config is
<add key="WebReference.Service"
value="http://localhost/HealthService/Service.asmx"/>
and the code to refer the WebService is
WebReference.Service wsHealth = new WebReference.Service();
But when I use code to execute a function in the webservice, like
ds =(System.Data.DataSet)wsHealth.GetSchools_Zip(txtZip1.Text);
it result into an error:
The request failed with HTTP status 401: Unauthorized
I have type the web service URL into browse, it execute OK, but it can't
call in program.
How can I do?
<add key="WebReference.Service"
value="http://localhost/HealthService/Service.asmx"/>
and the code to refer the WebService is
WebReference.Service wsHealth = new WebReference.Service();
But when I use code to execute a function in the webservice, like
ds =(System.Data.DataSet)wsHealth.GetSchools_Zip(txtZip1.Text);
it result into an error:
The request failed with HTTP status 401: Unauthorized
I have type the web service URL into browse, it execute OK, but it can't
call in program.
How can I do?