Failed to call doc2any.exe from C# or VB.NET source code

Hi. I try to call doc2any.exe from a PHP script using your exeshell class on a 64bit Windows Server 2008 R2 system. The exeshell-x64.dll was registered successfully - but I get the following error if I start the PHP script: PHP Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `exeshell.shell': Klasse nicht registriert.

What can I do to solve this problem?

Thanks in advance.
Regards
Customer
--------------------------------------
Hello.

Actually I'm evaluating your product and downloaded the latest version from your homepage.

Build: Nov 10 2012

The registration of the exeshell-x64.dll was successfull:

Furthermore I activated the php-extension "php_com_dotnet.dll" within the IIS-Manager.

But I still get this error.

Thanks in advance.
Customer
--------------------------------------
I suggest you may call doc2any.exe from your C# or PHP or ASP.NET or other languages directly on your Windows 2008 system, you can use CreateProcess() or Process.Start() to call doc2any.exe application.

You need also set MS Office DCOM run inside an interactive user account instead of system user account, please look at following web pages for more information,

https://www.verydoc.com/doc-to-any-faq.html
https://www.verydoc.com/blog/aspnet-account-dcom-permisson-for-ms-word.html
https://www.verydoc.com/blog/microsoft-excel-application-entry-missing-in-dcomcnfg.html
https://www.verydoc.com/blog/how-to-make-iis7-play-nice-with-office-interop.html
https://www.verydoc.com/others/configure-word-and-excel.htm
https://www.verydoc.com/others/configure%20office%20applications%20to%20run%20under%20the%20interactive%20user%20account.htm
http://www.verypdf.com/wordpress/201201/how-to-call-doc2any-exe-or-htmltools-exe-from-a-service-20896.html

You can also set more answers in our Knowledge Base,

https://www.verydoc.com/blog/category/doc-to-any-converter

If you still can not get it work, please feel free to let us know, we will assist you continue.

VeryDOC
--------------------------------------
Hello.

Thank you for the links to the different resources - but I get an error just during the calling/initialization of the EXEShell COM Library - far before doc2any/Excel/Word is started ....

My actual problem is, that I can't use your EXEShell class as mentioned on your page "CAll DOC to Any Converter Command Line from ..."

https://www.verydoc.com/doc-to-any-shell.html

Special interest for me: calling it from a Windows 2008 Server with IIS 7 and PHP:

..."Example #6 (PHP example),

Customer
--------------------------------------
Windows 2008 Server is the 64bit system, so you need use 64bit EXEShell COM Library, you need use exeshell-x64.dll, but not the exeshell.dll library.

VeryDOC
--------------------------------------
If you check the whole support request/thread you will find my second email and the attachments ...

Of course I'm using exeshell-x64.dll ...

Customer
--------------------------------------
Sorry for the confusion, it seems this problem is caused by permission settings on your server.

The first, please to check, can you run doc2any.exe in CMD window to convert your DOC file to PDF file properly? e.g.,

doc2any.exe D:\test.doc D:\out.pdf

Can you get it work fine in CMD window by manual?

If you can run doc2any.exe in CMD window to convert DOC file to PDF file correctly, but failed when you call it from C#, it is indicate this problem caused by permission of your IIS Server, you need give enough permission to IIS Server, e.g.,

1. Allow IIS Server to launch EXE application,
2. Allow "Everyone" user account to "Full Control" the folder where doc2any.exe exist,
3. Arrange MS Word DCOM Run inside "Administrator" user account instead of default system user account,

IIS_Permission_1

IIS_Permission_2

Once above three permission issues are resolved, I think you should no problem to call doc2any.exe or exeshell-x64.dll from C# to convert DOC files to PDF files.

If you still can not get it work on your server, you may create a remote desktop account on your test machine, send to us the user name and password, we will arrange our engineer to login your test machine and research this problem for you asap.

We suggest you may share your PC or Server by TeamViewer, TeamViewer can be downloaded from following website,

http://www.teamviewer.com

after you installed TeamViewer, please send to us your TeamViewer’s ID and Password, please also arrange your test machine running at 24 hours, after we logged into your test machine and solved the problem, we will send an email to you, then you can close the TeamViewer application.

By the way, we will release a VeryPDF Cloud API Service within a few weeks, with VeryPDF Cloud API Service, you can convert office documents to PDF files easily over the internet, you need install nothing to your Server System, you can just send a HTTP post to convert a DOC, DOCX, PPT, PPTX, XLS, XLSX, RTF file to PDF file, for example,

http://online.verypdf.com/api/?apikey=XXXXXXX&app=doc2any
&infile=https://dl.dropboxusercontent.com/u/5570462/SPAIN.docx

after you execute above URL, you will get a “http://online.verypdf.com/u/public/api/20130711-020606-rta622ohvn.pdf” file, you can download it to your local disk easily.

You can pass “infile” parameter to “  http://online.verypdf.com/api/  ”, our Cloud API Service will convert it to PDF file automatically.

VeryDOC

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!