net.pipe端点无法从客户端应用程序连接

时间:2013-08-31 15:36:42

标签: wcf iis net.pipe

我面临与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(如果存在)。

服务器堆栈跟踪:

at System.ServiceModel.Channels.ConnectionUpgradeHelper.DecodeFramingFault(ClientFramingDecoder decoder,IConnection connection,Uri via,String contentType,TimeoutHelper& timeoutHelper)

在System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection连接,ArraySegment`1前导码,TimeoutHelper& timeoutHelper)

at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection,TimeoutHelper& timeoutHelper)

在System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)

在System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)

at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

在System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel频道,TimeSpan超时)

在System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout,CallOnceManager cascade)

at 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 operation)

在System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

在[0]处重新抛出异常:

在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)

at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32 type)

at NetPipeValidation.ServiceReference1.IService1.GetData(Int32 value)

at NetPipeValidation.ServiceReference1.Service1Client.GetData(Int32 value)

在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注册的net.pipe和Uris的注册计数为1.使用这些计数器值,我假设我的端点已正确配置并且从服务器端角度有效。

由于某种原因,无法从客户端访问终点。我需要在机器上做任何其他验证吗?

1 个答案:

答案 0 :(得分:0)

net.pipe适用于x-process调用,而不适用于x-machine调用。如果您跨越机器边界,则使用http和/或net.tcp。如果您的客户端和服务在同一台计算机上,那么您应该使用net.pipe。