Visual Studio .NET - Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

Asked By Rajendra Dhanora on 23-Jul-08 02:44 AM
Hi
my problem is that i am trying to automate word
application using asp.net. I am using visual studio 2005 and added
following dlls as references(Microsoft Word 11.0 Obejct Library)
1) Interop.Microsoft.Office.Core.dll
2) Interop.VBIDE.dll
3) Interop.Word.dll

when i run it inside my IDE its running fine, but when i am trying to
run it using IIS, its giving strange error like

The server threw an exception. (Exception from HRESULT: 0x80010105
(RPC_E_SERVERFAULT))

try this... - Vasanthakumar D replied to Rajendra Dhanora on 23-Jul-08 02:58 AM

Hi,

maybe it has to do with the garbage collector.
We had a similar problem with Exchange RPC Connections and Outlook Objects.

We use a workaround, we count the items processed and after e.g. 20 Items you do a GC.Collect().

So the Garbage Collector releases the references to COM Objects clearly, and you can go on with your work.

There's also another approach. Since Excel objects still are COM Objects you can call explicitly a Marshal.ReleaseComObject (object) when you are finished with your e.g. workbook, so it's release from memory also.

check this - santhosh kumar replied to Rajendra Dhanora on 23-Jul-08 03:24 AM

http://forums.esri.com/Thread.asp?c=158&f=2272&t=257295
  

Word Automation - mv ark replied to Rajendra Dhanora on 23-Jul-08 03:55 AM

Microsoft does not recommend or support server-side Automation of Office. Check this MS KB article for detailed info: http://support.microsoft.com/default.aspx/kb/257757

If you need to just generate Word documents on the fly, consider using this Office XML & CSS alternative  - http://eggheadcafe.com/tutorials/aspnet/6e1ae1a8-8285-4b2a-a89b-fafc7668a782/aspnet-download-as-wor.aspx


check this.. - Santhosh N replied to Rajendra Dhanora on 23-Jul-08 04:22 AM

check this link if it helps you..

It is explaining the similar issue of your..

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=333971&SiteID=1

Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT - Binil Prasad replied to Rajendra Dhanora on 26-Feb-09 01:54 AM

Hi

Have you found the solution for that. I also have same kind of problem. I am a COM dll in my web service. The code works perfectly in asp.net 2.0 development server. When I deploy it in my IIS 5.1 it is not working.

It seems the deployed code is refering to some other place. The exception I am getting is

 Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT.

I cannot find out the reason. Please help.

Krishna replied to Binil Prasad on 18-Jun-10 12:12 AM
i just found a solution for this here http://krishnasr.blogspot.com/2010/06/server-threw-exception-exception-from.html
it was very simple. I had to catch that exception using try catch block