wcf - 没有兼容的传输管理器错误

标签 wcf net.tcp

回答

这是一个配置问题。

我们的应用程序中有两项服务。在出现问题之前,这两个服务都具有匹配且运行良好的显式绑定(bind)配置。一项服务将被删除,因此开发人员重新删除了显式绑定(bind)配置,忘记了 .NET 4.0 提供了默认(和不同的)绑定(bind)。

无论哪个服务首先被命中,它的设置都不会与任何其他设置不兼容(因为它是第一个),并且会很好。随后加载的服务将具有不同的绑定(bind)设置并被 TransportManager 拒绝。

明显的间歇性是因为我们只关注剩余的一项服务,认为另一项服务不再出现在图片中。监控实用程序仍在访问已删除的服务,并且有时会在配置更改后重新加载其他服务之前进入。



原始问题

首次在 IIS 中启动服务时,我们遇到间歇性错误。如果我对任何配置进行空白更改并重新加载,那么大约 50% 的时间服务会正常运行。一旦它起来了,就可以走了。但下次我们部署到这个盒子时,我们会重新开始俄罗斯轮盘赌。

我们查看了其他论坛上有关同一错误的帖子,但到目前为止还无法找到明确的解决方案。我们花了一段时间才意识到,我们尝试的任何配置更改都没有真正影响问题,因为仅仅空白更改就足以让它重新启动并使其在部分时间工作。 TransportManagerTable 内部似乎存在某种竞争条件,当服务无法启动时它可能是空的?不确定,尝试进行一些跟踪或其他操作来为我们提供有关 TransportManagerTable 实例中内容的更好信息。


未找到 URI“net.tcp://box:10101/DEV/AwesomeService.svc”的兼容 TransportManager。这可能是因为您使用了指向虚拟应用程序外部的绝对地址,或者端点的绑定(bind)设置与其他服务或端点设置的设置不匹配。请注意,同一协议(protocol)的所有绑定(bind)在同一应用程序中应具有相同的设置。 描述:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的更多信息。

异常详细信息:System.InvalidOperationException:找不到 URI“net.tcp://box:10101/DEV/AwesomeService.svc”的兼容 TransportManager。这可能是因为您使用了指向虚拟应用程序外部的绝对地址,或者端点的绑定(bind)设置与其他服务或端点设置的设置不匹配。请注意,同一协议(protocol)的所有绑定(bind)在同一应用程序中应具有相同的设置。

来源错误: 执行当前 Web 请求期间生成未处理的异常。有关异常来源和位置的信息可以使用下面的异常堆栈跟踪来识别。

堆栈跟踪:

[InvalidOperationException: There is no compatible TransportManager found for URI 'net.tcp://box:10101/DEV/AwesomeService.svc'. This may be because that you have used an absolute address which points outside of the virtual application, or the binding settings of the endpoint do not match those that have been set by other services or endpoints. Note that all bindings for the same protocol should have same settings in the same application.]
System.ServiceModel.Channels.TransportChannelListener.ThrowTransportManagersNotFound() +8955459 System.ServiceModel.Channels.TransportChannelListener.SelectTransportManagers() +16199511 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback) +71
System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan timeout) +182
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +789
System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) +375

[InvalidOperationException: The ChannelDispatcher at 'net.tcp://box:10101/DEV/AwesomeService.svc' with contract(s) '"IAwesomeService", "ILoggingService"' is unable to open its IChannelListener.]
System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) +16199205
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +789 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +126
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +789
System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +287
System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +1132

[ServiceActivationException: The service '/DEV/AwesomeService.svc' cannot be activated due to an exception during compilation. The exception message is: The ChannelDispatcher at 'net.tcp://box:10101/DEV/AwesomeService.svc' with contract(s) '"IAwesomeService", "ILoggingService"' is unable to open its IChannelListener..] System.Runtime.AsyncResult.End(IAsyncResult result) +890624
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +180062
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +107

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

最佳答案

编辑配置以将地址设置为空,错误已修复。

关于wcf - 没有兼容的传输管理器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6112612/

相关文章:

c# - WCF流式文件传输

wcf - 是否可以将 netTcpBinding 与 VS 2008 开发服务器一起使用?

c# - 如何使用日期范围从 Redis (pub/sub) 保存和检索 channel 数据?

wcf - Azure 服务总线中继 - 从本地获取数据

asp.net - 在 wcf 服务中使用 aspNetCompatibilityEnabled ="false"获取 HttpContext.Current

.net - 为了让 WCF 传递大字符串,在哪里增加 maxStringContentLength?

wcf - 启用传输安全性后,Mono WCF 客户端无法与 .NET WCF 服务器通信

windows-services - 无法连接到 net.tcp ://localhost. .. TCP 错误代码 10061

wcf - 从 Web.config 启用 net.tcp 协议(protocol)

c# - 如何在 XSD 数据协定中指定泛型类型参数?