我正在阅读学习WCF一书和第一个教程实验室HelloIndigo我收到以下错误.
无法连接到http:// localhost:8000/HelloIndigo/HelloIndigoService.TCP错误代码10061:无法建立连接,因为目标计算机主动拒绝它127.0.0.1:8000.
它出现在客户端项目中的字符串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();
Run Code Online (Sandbox Code Playgroud)
我已经深入搜索了这个,但我不是更明智的.
任何人都可以解释这个问题以及如何补救?