There isn't a whole lot of information on using Service References over Web References when it comes to passing in username and password credentials.
Normally with a Web Reference you'd do this:
MyWebRef.MyClient webClient = new MyWebRef.MyClient();
NetworkCredential credentials = new NetworkCredential("myUser", "myPassword");
webClient.Credentials = credentials;
The Alternative code to that:
MyServiceRef.MyClient client = new MyServiceRef.MyClient();
client.ClientCredentials.UserName.UserName = "myUser";
client.ClientCredentials.UserName.Password = "myPassword";
While this may not seem much different, it isn't immediately obvious where to look for setting the username and password inside the Service Reference.
068a2f3c-bfb2-4b4e-851c-58435d8c2394|1|4.0
Tags: