【问题标题】:net.pipe endpoint is not connectable from client applicationnet.pipe 端点无法从客户端应用程序连接
【发布时间】: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。使用这些计数器值,我假设我的端点已正确配置并且从服务器端的角度来看是有效的。

由于某种原因,客户端无法访问端点。我还需要在机器中进行其他验证吗?

【问题讨论】:

    标签: wcf iis net.pipe


    【解决方案1】:

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

    【讨论】:

    • 场景在机内。我的 wcf 服务托管在同一台机器上,客户端也托管在同一台机器上
    • 您是否将 net.pipe 添加到 IIS 中的“启用协议”设置中?不是绑定,而是站点/应用程序?
    • 您能否向您的服务(临时)添加一个方法以返回您的服务的基地址列表?这将显示每个方案的地址。我在这里展示如何做到这一点:blogs.msdn.com/b/rickrain/archive/2008/08/23/…
    • 以下是我的服务的基地址。 net.pipe:///MyWCFService/Service1.svc net.tcp:///MyWCFService/Service1.svc http:///MyWCFService/Service1.svc
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-09-24
    • 1970-01-01
    • 2011-09-19
    • 1970-01-01
    • 2019-01-21
    • 1970-01-01
    相关资源
    最近更新 更多