服务器抛出异常。 (来自HRESULT的异常:0x80010105(RPC_E_SERVERFAULT)) [英] The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

查看:147
本文介绍了服务器抛出异常。 (来自HRESULT的异常:0x80010105(RPC_E_SERVERFAULT))的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我在同一服务器上运行了两个不同的服务,相同代码使用两个服务一个运行得很好而第二个是两个服务并行运行时显示错误。



错误显示此行:

Actually i have run two different Services on Same Server , Same Code use Both Services one is run very well And Second is show Error when Both Services run parallel .

Error Showing this Line :

for (int shape = 1; shape <= ppPres.Slides[slide].Shapes.Count; shape++)
                       {

                           if (ppPres.Slides[slide].Shapes[shape].HasTextFrame == Microsoft.Office.Core.MsoTriState.msoTrue)
                           {
                               ppPres.Slides[slide].Shapes[shape].TextFrame.AutoSize = PowerPoint.PpAutoSize.ppAutoSizeNone; // Error Showing this line


                               fieldNames = ppPres.Slides[slide].Shapes[shape].TextFrame.TextRange.Text.Split(delimiter);
                               foreach (string fName in fieldNames)
                               {
                                   // Doing some work


                                   }
                               }
                           }
                       }

推荐答案

您不应该在Web服务器/服务后面的服务器环境中使用Office,因为它需要很多资源并且不具备可扩展性。



尝试使用不依赖于MSOffice的PowerPoint组件,如果你搜索,那里有很多。



问题在于办公产品的COM互操作中的内存泄漏: http://forums.asp.net/t/1308404.aspx?RPC_E_SERVERFAULT+COM+Interop+ [ ^ ]
You should not use Office in a server environment behind a web server/service as it takes a lot of resources and is not scalable.

Try using a PowerPoint component which is not dependent on MSOffice instead, there are lot out there if you search.

The problem is with memory leaks in the COM interop for office products : http://forums.asp.net/t/1308404.aspx?RPC_E_SERVERFAULT+COM+Interop+[^]


这篇关于服务器抛出异常。 (来自HRESULT的异常:0x80010105(RPC_E_SERVERFAULT))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆