Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC Server Unavailable #69

Open
suniltandan opened this issue Sep 17, 2020 · 2 comments
Open

RPC Server Unavailable #69

suniltandan opened this issue Sep 17, 2020 · 2 comments

Comments

@suniltandan
Copy link

This issue is similar to #13 however this is also happening on export of PowerPoint and Excel.

Windows Version: 10.0.14393 (x64)
OfficeToPDF Version: 1.9.0.2

The command is getting run through a script which is running through command line. The error for PowerPoint conversion:

Der Remoteprozeduraufruf ist fehlgeschlagen. (Ausnahme von HRESULT: 0x800706BE)
Der RPC-Server ist nicht verf�gbar. (Ausnahme von HRESULT: 0x800706BA)
Did not convert

Translated Error would be:

The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
The RPC server is not available. (Exception from HRESULT: 0x800706BA)
Did not convert

The error for Excel conversion:

Unbehandelte Ausnahme: System.Runtime.InteropServices.COMException: Der RPC-Server ist nicht verf�gbar. (Ausnahme von HRESULT: 0x800706BA)
bei Microsoft.Office.Interop.Excel.Workbooks.Close()
bei OfficeToPDF.ExcelConverter.Convert(String inputFile, String outputFile, Hashtable options)
bei OfficeToPDF.Program.Main(String[] args)

Translated Error:

Unhandled exception: System.Runtime.InteropServices.COMException: The RPC server is not available. (Exception from HRESULT: 0x800706BA)
at Microsoft.Office.Interop.Excel.Workbooks.Close ()
at OfficeToPDF.ExcelConverter.Convert (String inputFile, String outputFile, Hashtable options)
at OfficeToPDF.Program.Main (String [] args)

Strangely, this error seems to be resolved when running the script as a service.

Does anyone have idea on why this might be happening?

@iamkeyur
Copy link

Create the folder C:\Windows\System32\config\systemprofile\Desktop

If this does not work, try below.

In the command line put DCOMCNFG
Component Services -> Computers -> My Computer -> DCOM Config
Find "Microsoft Word 97 - 2003 Document" (If it is missing check if your Word is also 64 bit (if your Windows is) if it is not run mmc comexp.msc /32 instead of DCOMCNFG on step 1 as suggested by Darkseal here)
Right click -> Properties
Go To Tab Security and Edit the "Customize" radio buttons so that IIS_IUSRS could have rights for launch and access
Go to Tab Identity and choose "The interactive user"
Apply changes and try again
If all this fails, go also to tab "General" and in "Authentication Level" drop down choose "None".

@suniltandan
Copy link
Author

@iamkeyur thanks for you comment.

Those configurations are indeed necessary to run it as a service and the necessary folders/permissions are already there.

As mentioned on the original post, the call succeeds when the application is running as a service however it fails when running through the command prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants