我們有一個不時發生的問題。我們有一個Web服務器和一個應用程序服務器。我們的應用程序服務器包含安裝爲COM +服務器和庫應用程序的業務邏輯代碼。然後,我們在Web服務器上放置一個代理,以強制從Web服務器到COM +服務器的所有調用。幾乎100%的時間一切運作正常。每一次和一個藍月亮,當然,只有在一臺生產機器上,這個問題是否會讓它變成醜陋的頭。以下是我們通過企業庫登錄的事件日誌條目。COM + System.InvalidCastException錯誤。
它開始了記錄此事件日誌:
Type : System.InvalidCastException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Unable to cast object of type 'System.__ComObject' to type 'System.EnterpriseServices.IRemoteDispatch'.
Source : System.EnterpriseServices
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Runtime.Remoting.Messaging.IMessage Invoke(System.Runtime.Remoting.Messaging.IMessage)
Stack Trace : at System.EnterpriseServices.RemoteServicedComponentProxy.Invoke(IMessage reqMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
此事件日誌是後來請求後登錄。
Type : System.InvalidCastException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Unable to cast COM object of type 'System.__ComObject' to interface type 'System.EnterpriseServices.IRemoteDispatch'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6619A740-8154-43BE-A186-0319578E02DB}' failed due to the following error: The remote procedure call failed. (Exception from HRESULT: 0x800706BE).
Source : System.EnterpriseServices
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Runtime.Remoting.Messaging.IMessage Invoke(System.Runtime.Remoting.Messaging.IMessage)
Stack Trace : at System.EnterpriseServices.RemoteServicedComponentProxy.Invoke(IMessage reqMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
堆棧跟蹤進一步,但沒關係。基本上,它應該從Web服務器跳轉到COM +服務器時發生。
我們可以通過重新啓動COM +服務器上的COM +服務器應用程序來解決這個問題,但這對我來說不是一個好的解決方案......我是一個修復者。
這些錯誤並不完全清楚發生了什麼。任何人都可以闡明這些錯誤的含義以及如何避免發生這些錯誤?
通常情況下,我永遠不會發布這樣的帖子。我想我遇到的問題是正在發生的異常的星雲。搜索爲什麼會發生這種情況只會產生很少的結果。