2011-05-24 74 views
1

答案沒有兼容TransportManager錯誤

這是一個配置問題。

我們在應用程序中有兩個服務。在問題發生之前,這兩個服務都具有明確的綁定配置,並且匹配並運行良好。一個服務將被刪除,所以dev開發了顯式綁定配置,忘記了.NET 4.0提供了默認(和不同的)綁定。

無論哪種服務首先被擊中,其設置將不會與任何其他設置不兼容(因爲它是第一次),並沒有問題。隨後加載的服務將具有不同的綁定設置,並被TransportManager拒絕。

這種明顯的間歇性是由於我們只關注剩下的一項服務,認爲其他服務已不在圖中。監控實用程序仍然會觸發移除的服務,並且有時會在配置更改後重新加載其他服務之前進入。



原始的問題

我們得到一個間歇性的錯誤時,首先啓動在IIS服務。如果我將空格更改爲任何配置並重新加載,那麼大約50%的時間服務將正常運行。一旦起來,這是很好的去。但下次我們部署到這個盒子時,我們又重新開始了俄羅斯輪盤賭。

我們查看了其他論壇帖子上的同一個錯誤,到目前爲止還沒有能夠拿出一個明確的修復。我們花了一段時間才意識到,我們所嘗試的任何配置更改實際上都沒有影響到這個問題,因爲只是空白的更改足以讓它重新開始並讓它在部分時間內運行。似乎TransportManagerTable內部存在某種競爭條件,可能在服務無法啓動時它是空的?不確定,試圖獲得一些跟蹤或某些信息,讓我們可以更好地瞭解TransportManagerTable實例中的內容。


沒有發現URI沒有兼容TransportManager '的net.tcp://箱:10101/DEV/AwesomeService.svc'。這可能是因爲您使用了虛擬應用程序之外的絕對地址,或者端點的綁定設置與其他服務或端點設置的綁定設置不匹配。請注意,相同協議的所有綁定應該在同一個應用程序中具有相同的設置。 描述:執行當前Web請求期間發生未處理的異常。請查看堆棧跟蹤以獲取有關該錯誤的更多信息以及源代碼的位置。

異常詳細信息:System.InvalidOperationException:找不到與URI'net.tcp:// box:10101/DEV/AwesomeService.svc'兼容的TransportManager。這可能是因爲您使用了虛擬應用程序之外的絕對地址,或者端點的綁定設置與其他服務或端點設置的綁定設置不匹配。請注意,相同協議的所有綁定應該在同一個應用程序中具有相同的設置。

源錯誤: 執行當前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

+0

請分享相關的配置位。 – 2011-05-24 15:12:16

回答

2

編輯的配置設置地址空和錯誤是固定的。

1

要添加多一點點的指令,這個問題是最有可能在你的服務的web.config文件。在節點中,確保您的端點地址是空字符串 - 或者 - 確保您的端點地址URL指向您的服務的確切位置,如您在IIS中指定的那樣。

<endpoint address="" binding="basicHttpBinding" bindingConfiguration="MyServiceBinding" contract="MySolution.IMyService"/>