Com+ E_FAIL error for C# app in server 2019

315 views Asked by At

How do i troubleshoot this? i took a memory dump of the process while it was in a failed state but this is coming from COM+ not the actual exe that is running.... This error occurs in a custom com+ application deployed to Windows Server 2019 but does not occur for the same dll (same file copied and installed) to server 2012. It does not occur consistently nor does it correlate to any windows event error or iis issue. sometimes it occurs 2-3 times a day and sometimes it goes 2 weeks without occuring. it isnt any particular part of the application sometimes its looking up users or ad groups. no packets are blocked by the firewall. it also does not occur on a windows server 2019 test server but that server doesnt get much traffic to test.

Exception information: Exception type: COMException Exception message: Error HRESULT E_FAIL has been returned from a call to a COM component. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri) at System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type serverType) at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj)

1

There are 1 answers

0
Dan On

the c# aspx code as failing on instantiating the class. i put a try catch in the constructor and the underlying issue was an illegal read to the registry which had been unloaded. the solution was to set a group policy not to unload the registry when the service account user logs out.