【发布时间】:2013-09-04 04:18:26
【问题描述】:
我遇到了与我的 WCF 服务的 net.pipe 端点相关的问题。我在 Windows 2008 R2 机器上配置了所需的服务器角色(应用程序和 Web 角色)和功能(Windows 激活)。我创建了一个带有 net.tcp、net.pipe 和 http 端点的示例 wcf 服务,并将其托管在 IIS 中。我已经在站点级别以及 Web 应用程序级别启用了所需的绑定。 net.tcp 和 http 端点工作正常。但是如下所述,net.pipe 端点出现错误
System.ServiceModel.EndpointNotFoundException:net.pipe://localhost/MyWCFService/Service1.svc 上没有可以接受消息的端点侦听。这通常是由不正确的地址或 SOAP 操作引起的。有关更多详细信息,请参阅 InnerException(如果存在)。
服务器堆栈跟踪:
在 System.ServiceModel.Channels.ConnectionUpgradeHelper.DecodeFramingFault(ClientFramingDecoder 解码器, IConnection 连接, Uri via, String contentType, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
在 System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan 超时)
在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan 超时)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan 超时)
在 System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan 超时)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan 超时)
在 System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel 通道,TimeSpan 超时)
在 System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime 操作)
在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage 消息)
在 [0] 处重新抛出异常:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 类型)
在 NetPipeValidation.ServiceReference1.IService1.GetData(Int32 值)
在 NetPipeValidation.ServiceReference1.Service1Client.GetData(Int32 值)
在 NetPipeValidation.Form1.button1_Click(Object sender, EventArgs e)
我最初的怀疑是 net.pipe 协议没有正确激活。因此验证了所有必需的 Windows 服务都在正确运行(WAS、Net.Pipe Adaptar、Net.Tcp Adaptar)。我还检查了 SMSvcHost.exe.config 文件并确保它具有正确的配置。
由于所有服务都在运行,我启用了性能计数器并检查了我的 net.pipe 注册是否成功。 Net.pipe 的 Regitrations Active 和 Net.pipe 注册的 Uris 计为 1。使用这些计数器值,我假设我的端点已正确配置并且从服务器端的角度来看是有效的。
由于某种原因,客户端无法访问端点。我还需要在机器中进行其他验证吗?
【问题讨论】: