We have an issue that occurs from time to time. We have a web server and an application server. Our application server houses our Business Logic code which is installed as COM+ Server and Library applications. We then put a proxy on the web server to force all calls from the web server to the COM+ Server. Almost 100% of the time everything operates properly. Every once and a blue moon, and of course, only on a production machine, does this issue rear it's ugly head. Below is the event log entry that we are logging via the Enterprise Library.
It starts out logging this event log:
Type : System.InvalidCastException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Message : Unable to cast object of type 'System.__ComObject' to type 'System.EnterpriseServices.IRemoteDispatch'.Source : System.EnterpriseServicesHelp link : Data : System.Collections.ListDictionaryInternalTargetSite : 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)
Then this event log is logged after a later request.
Type : System.InvalidCastException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Message : 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.EnterpriseServicesHelp link : Data : System.Collections.ListDictionaryInternalTargetSite : 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)
The stack traces go a little further, but it doesn't matter. Basically at the point it is occurring when it is supposed to jump from the web server to the COM+ server.
We can solve this problem by restarting the COM+ Server applications on the COM+ Server, but that is not a good enough of a solution for me...I am a fixer at heart.
These errors are not exactly being explicit with what is going on. Can anyone shed any light on what these errors mean and how to potentially avoid getting these errors?
Normally, I would never make a post like this. I guess the problem that I am having is with the nebulosity of the exception that is occurring. Doing a search on why this is happening is yielding very few results.