Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
try
{
WebClient reportClient = new WebClient();
reportClient.Credentials = new NetworkCredential("jusankar", "jusankar123");
string reportUri = "http://xyz.com:4511/LIService.svc/GetReport";
reportClient.DownloadStringCompleted +=new DownloadStringCompletedEventHandler(reportClient_DownloadStringCompleted);
reportClient.DownloadStringAsync(new Uri(reportUri));
}
catch (Exception exp)
{
    MessageBox.Show("I am in problem");
}



It's not working, how to do?

How to pass username and password through REST type web-service and authenticate
Posted
Comments
Patrick Kalkman 5-Apr-11 7:55am    
What type of authentication is the server/service using?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900