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

With a windows service, Word file conversion error #13

Closed
jbourree opened this issue Jun 28, 2022 · 5 comments
Closed

With a windows service, Word file conversion error #13

jbourree opened this issue Jun 28, 2022 · 5 comments

Comments

@jbourree
Copy link

By launching the conversion of a word document in a webservice, I have the error "The file 'doc.docx' seems to be corrupt, error: Object reference not set to an instance of an object".
Is there a special configuration for windows services? The same conversion from a console application works.

@Sicos1977
Copy link
Owner

Are you running this service under another user?

@Sicos1977
Copy link
Owner

If so then make sure you have given this user launch permissions for the different office applications with this tool --> https://docs.microsoft.com/en-us/windows/win32/com/setting-processwide-security-using-dcomcnfg

@jbourree
Copy link
Author

The service running with the same user as the one with which word is installed.

@jbourree
Copy link
Author

The problem is not DCOM.
The fix is to create the directories:
Windows x64: C:\Windows\SysWOW64\config\systemprofile\Desktop
Windows x86: C:\Windows\System32\config\systemprofile\Desktop

@Minhounet
Copy link

I must add that "C:\Windows\System32\config\systemprofile\Desktop" must be created through windows explorer (and not a dos command line) as there is a Windows file redirection (that costs me a lot of days..).

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

3 participants