RPC_E_SERVERFAULT

6

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?

asp.net
com
asked on Stack Overflow Sep 14, 2012 by Sachin

5 Answers

5

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.

answered on Stack Overflow Sep 21, 2012 by Chris Dickson
0

Monitor your site to capture exception when it raise.

Use Debug Diagnostics Tool v1.2

With the generated dump is easier to identify the point of failure.

answered on Stack Overflow Sep 14, 2012 by lsalamon
0

Also could mean the COM object crashed. Try to rerun the application represented by the COM object by itself and see if it crashes or produces some error.

answered on Stack Overflow Feb 24, 2014 by Denis
0

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

[STAThread]
static void Main(string[] args)
answered on Stack Overflow May 22, 2015 by Hùng Nguyễn • edited May 22, 2015 by Joe Kennedy
0

I'm running Powershell scripts that use the MS Office 2010 Excel COM objects and started receiving this error. The culprit was the latest MS Office patches. Sorry, I can't specify exactly which one caused the error (I uninstalled a bunch at time), but uninstalling one of them solved the issues. The updates were installed on 7/18/2016.

answered on Stack Overflow Jul 21, 2016 by JasonV

User contributions licensed under CC BY-SA 3.0