EndpointNotFoundException when working with tutorials in Learning WCF

I am working on the WCF Learning book and in the first HelloIndigo training lab . I get the following error.

Failed to connect to http: // localhost: 8000 / HelloIndigo / HelloIndigoService . TCP error code 10061: The connection could not be completed because the target machine actively refused it 127.0.0.1:8000.

It is displayed in the Client project in the line string s = proxy.HelloIndigo ();

EndpointAddress ep = new EndpointAddress("http://localhost:8000/HelloIndigo/HelloIndigoService");

IHelloIndigoService proxy = ChannelFactory<IHelloIndigoService>.
            CreateChannel(new BasicHttpBinding(), ep);
string s = proxy.HelloIndigo();
Console.WriteLine(s);
Console.WriteLine("Press <ENTER> to terminate Client");
Console.ReadLine();

I intensively searched for it, but I am not wiser.

Can someone explain the problem and how to fix it?

+5
source share
2 answers

This may be a few things; first you need to check:

  • ?
  • , ?
  • - , ?

, .

+3

"". . " " "Startup Project". " " - "" "" - "" "" "". F5 , Host , .

+2

All Articles