System.ServiceModel.EndpointNotFoundException: 无法连接到 http://localhost:8888/
generalCalculator。TCP 错误代码 10061: 由于目标机器积极拒绝,无法连接。 127.0.0.
1:8888。 ---> System.Net.WebException: 无法连接到远程服务器 ---> System.Net.Soc
kets.SocketException: 由于目标机器积极拒绝,无法连接。 127.0.0.1:8888
在 System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddre
ss socketAddress)
在 System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
在 System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Sock
et s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state,
IAsyncResult asyncResult, Int32 timeout, Exception& exception)
--- 内部异常堆栈跟踪的结尾 ---
在 System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
在 System.Net.HttpWebRequest.GetRequestStream()
在 System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStre
am()
--- 内部异常堆栈跟踪的结尾 ---
Server stack trace:
在 System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStre
am()
在 System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpCha
nnelRequest.SendRequest(Message message, TimeSpan timeout)
在 System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeS
pan timeout)
在 System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message messag
e, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan tim
eout)
在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCall
Message methodCall, ProxyOperationRuntime operation)
在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
在 Contracts.ICalculator.Add(Double x, Double y)
在 Client.CalculatorClient.Add(Double x, Double y) 位置 E:\project\test\WCF\t
est1\Client\CalculatorClient.cs:行号 28
在 Client.Program.Main(String[] args) 位置 E:\project\test\WCF\test1\Client\P
rogram.cs:行号 29无