【发布时间】:2010-11-17 20:17:31
【问题描述】:
我有两个 WCF 服务托管在 Windows Server 2003 机器上的单个 Windows 服务中。如果 Windows 服务需要访问 WCF 服务中的任何一个(例如发生定时事件时),它会使用公开的五个命名管道端点之一(不同的服务合同)。该服务还为这两个服务中的每一个公开了 HTTP MetadataExchange 端点,并为服务器外部的消费者公开了 net.tcp 端点。
通常情况会很好,但有时我会收到一条看起来像这样的错误消息:
System.ServiceModel.EndpointNotFoundException:在 net.pipe://localhost/IPDailyProcessing 上没有可以接受消息的端点侦听。这通常是由不正确的地址或 SOAP 操作引起的。有关更多详细信息,请参阅 InnerException(如果存在)。 ---> System.IO.PipeException:在您的本地计算机上找不到管道端点“net.pipe://localhost/IPDailyProcessing”。 --- 内部异常堆栈跟踪结束 --- 服务器堆栈跟踪: 在 System.ServiceModel.Channels.PipeConnectionInitiator.GetPipeName(Uri uri) 在 System.ServiceModel.Channels.NamedPipeConnectionPoolRegistry.NamedPipeConnectionPool.GetPoolKey(EndpointAddress 地址,Uri via) 在 System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan 超时) 在 System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(时间跨度超时) 在 System.ServiceModel.Channels.CommunicationObject.Open(时间跨度超时) 在 System.ServiceModel.Channels.ServiceChannel.OnOpen(时间跨度超时) 在 System.ServiceModel.Channels.CommunicationObject.Open(时间跨度超时) 在 System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel 通道,TimeSpan 超时) 在 System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan 超时,CallOnceManager 级联) 在 System.ServiceModel.Channels.ServiceChannel.EnsureOpened(时间跨度超时) 在 System.ServiceModel.Channels.ServiceChannel.Call(字符串操作,布尔单向,ProxyOperationRuntime 操作,Object[] 输入,Object[] 输出,TimeSpan 超时) 在 System.ServiceModel.Channels.ServiceChannel.Call(字符串操作,布尔单向,ProxyOperationRuntime 操作,Object[] 输入,Object[] 输出) 在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage 方法调用,ProxyOperationRuntime 操作) 在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage 消息)
它不会可靠地发生,这令人抓狂,因为我无法在我想重复的时候重复它。在我的 Windows 服务中,我也有一些定时事件和一些文件侦听器,但这些是相当罕见的事件。有谁知道为什么我可能会遇到问题?任何帮助将不胜感激。
【问题讨论】:
-
我也在为同样的问题而苦苦挣扎,你有没有找到解决办法?定期发生此错误。在某些情况下,异常是“无法发送消息,因为端点地址 'net.pipe://localhost/d927b6b5-5994-4bd2-b92a-2fbdbae18d28/SendEmailWorkflow/Creation 的服务”的协议不可用地址'。该服务未托管在 IIS 中,因此排除了 IIS/AppPool 重置。
标签: .net web-services wcf named-pipes