RPC_E_SERVERFAULT

In my asp.net application, I call one lump method using interop dll. This works fine in a normal state, but sometimes in production it is tossed below the exception.

System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

I suspect this happens when a large number of users access a single page at the same time.

Does anyone know a solution or steps to debug this problem.

I have another question. when searching the Internet, I came across this aspcompact attribute and the MTA vs STA thread model related to com components. Is this aspcompact attribute applicable in the case of interop dll (Runtime callable wrappers). Will adding this attribute solve my problem?

+4
source share
5 answers

RPC_E_SERVERFAULT means that the out-of-process COM server has selected a structured (Win32) exception, which can be related to all things like Access Violation, Divide by Zero, etc. In other words, there is an error in the COM server, and you cannot do anything in your calling application to cure this (if you cannot find out what the error is, and you can design a way to call the COM component that does not execute the buggy code )

You need to find which of your colleagues is responsible for the COM server, force him / her to use the debugger to capture the crash dump when an exception occurs, then do delayed debugging on the dump to diagnose the problem and fix it.

+2
source

Keep an eye on your site to catch an exception when it rises. Use Debugging Diagnostic Tool v1.2

With the created dump it is easier to determine the point of failure.

0
source

It may also mean that the COM object has crashed. Try re-launching the application represented by the COM object and see if some error or failure occurs.

0
source

I had the same problem, but I got it to work by adding the [STAThread] attribute to the main function.

[STAThread] static void Main(string[] args) 
0
source

I am running Powershell scripts that use MS Office 2010 Excel COM objects and started to get this error. The latest fixes of MS Office became the criminal. Sorry, I can’t say exactly which one caused the error (I deleted the heap for a while), but deleting one of them solved the problems. Updates were installed on 7/18/2016.

0
source

Source: https://habr.com/ru/post/1434221/


All Articles