I have a WCF web service project called ALC_Service. I have built a client application that needs to access this service. I assumed that I could change the URL of the service at runtime and it should just work but I keep getting a timeout when I call the
method of the service (System.Net.WebException: "The operation has timed-out.").
Here is the code that I am using:
private void button1_Click(object sender, EventArgs e)
button1.Enabled = false;
// Display the message from the service
AlcServiceReference.AlcService service = new ALC_Client.AlcServiceReference.AlcService();
service.Url = "http://fakepooPC/ALC_Service/AlcService.svc";
button1.Text = service.GetTimeString();
button1.Enabled = true;
Basically, I create an instance of AlcService and set the URL to the machine that is running the service. Then, I try to call the method of the service (GetTimeString) and here is where it times out.
View Complete Post