none
The remote procedure call failed. (Exception from HRESULT: 0x800706BE) RRS feed

  • Question

  • Background: .NET project while generating Excel using  calling constructor oXL = CreateObject("Excel.Application") . while calling createObject Class throwing below exception. This issue happening only in Production and Development it is working fine. Both environments are same (OS, Office and .NET ) Please help to give solution on this error.

    eDolphinMain.StartMain [objWfMgr.DispatchReminders] Exception : System.Exception: WfMgr.DispatchReminder:

    System.Exception: UserReminderService.DispatchReminder:

    System.Exception: ActivityMgr.Remind: ApproveActivity.Remind: DocMgr.GetDocForSendToNextApprover

    Exception : The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

    at eDolphinEngine.Activity.ActivityManager.Remind(Int32 intActStatus, Int32 intDays, Int32 intMaxNotifyDays)

    at eDolphinEngine.Workflow.UserReminderService.DispatchReminders()

    at eDolphinEngine.Workflow.UserReminderService.DispatchReminders()

    at eDolphinEngine.Workflow.WorkflowManager.DispatchReminders()

    at eDolphinEngine.Workflow.WorkflowManager.DispatchReminders()

    at eDolphinEngine.eDolphinMain.StartMain()

    Tuesday, April 28, 2015 2:53 AM

All replies

  • Hello Srini,

    Do you use secondary threads for automating Excel? Where and when do you run the code?

    What Excel version do you have installed on the problematic machine? Is it Excel 2010 Click2Run?

    Take a look at the Office 2010 Click-to-Run compatibility with add-ins article which states the following:

    Out-of-process add-ins/applications are stand-alone programs, scripts, or applications that use Office object model APIs to start functionality in the application and integrate with Office. In this case, the out-of-process application drives Office. Out-of-process applications are not supported in Click-to-Run.

    Tuesday, April 28, 2015 5:21 AM
  • Hi,

    Thanks for your prompt response. kindly check my below details and advise further on resolution on this error.

    Do you use secondary threads for automating Excel? Where and when do you run the code?

    Ans: yes there may be possible to call concurrently oXL = CreateObject("Excel.Application").

    This program will run from Web application and Windows services.

    What Excel version do you have installed on the problematic machine? Is it Excel 2010 Click2Run?

    Microsoft office professional plus 2010 is installed in server. not installed Office Click-to-Run in server. 


    Out-of-process add-ins/applications are stand-alone programs, scripts, or applications that use Office object model APIs to start functionality in the application and integrate with Office. In this case, the out-of-process application drives Office. Out-of-process applications are not supported in Click-to-Run.

    More Details:
    Based on investigation i have found one of the solution. after done below setting some times working (before never worked). Still this problem exists. 

    Component Services -> Computers -> My Computer -> DCOM Config -> Microsoft Excel Application
    Right click Microsoft Excel Application -> Properties -> Security tab
    Click Customize for “Launch and Activation Permissions” -> Edit -> Add
    Enter “NETWORK SERVICE”, click “Check Names”, click OK
    Allow “Local Launch” and “Local Activation” for “NETWORK SERVICE” then click OK
    Select Customize for “Access Permissions” -> Edit -> Add
    Enter “NETWORK SERVICE”, click “Check Names”, click OK
    Allow “Local Access” for “NETWORK SERVICE” then click OK
    Click OK

    Error is throwing:      Cannot create ActiveX component.
    The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

    As this  is production environment I can not play around. Kindly help to advise on possible cause.

    Friday, May 15, 2015 5:21 AM
  • Hello Srini,

    This program will run from Web application and Windows services.

    That is the keywords...

    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

    If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. Read more about that in the Considerations for server-side Automation of Office article.

    Friday, May 15, 2015 2:05 PM
  • Hi Eugene,

    Thanks for giving information on problem and solution. I will look for alternatives to give permanent solution for this issue. 

    Can you able to give temporary fix for this issue to work around so alternatively i will work on permanent fix. 

    Saturday, May 16, 2015 4:26 PM