Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RPC_E_SERVERFAULT

Tags:

asp.net

com

In my asp.net application I am calling one com component method using Interop dll. This is working fine in normal condition but In production sometimes its throwing below exception

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

I am suspecting that this is happening when large number of users are accessing same page simultaneously.

Is somebody know solution or steps to debug this issue.

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

like image 891
Sachin Avatar asked Sep 14 '12 14:09

Sachin


1 Answers

RPC_E_SERVERFAULT means that the out-of-process COM server threw a structured (Win32)exception, which could be all sorts of things, such as an Access Violation, Divide by Zero, etc. In other words, there's a bug in the COM server's implementation and there's nothing you can do in your calling application to cure this (unless you can find out what the bug is and can design a way to call the COM component which doesn't execute the buggy code).

You need to find whichever of your colleagues is responsible for the COM server, get him/her to use the debugger to capture a crash dump when the exception occurs, then do post-mortem debugging on the dump to diagnose the problem and fix it.

like image 111
Chris Dickson Avatar answered Nov 11 '22 23:11

Chris Dickson