How to make docPrint SDK working in IIS 7 under the NETWORK SERVICE account?


I have been trying to get docPrint SDK working in IIS 7 under the NETWORK SERVICE account. What I want to do is to convert a Office document (Word, Excel, txt, etc.) to an image in a ASP.NET web service. The web service runs under the standard NETWORK SERVICE account in IIS7. I followed the example 4 listed on the web page

but I got the following error in doc2pdf.log,

CreateProcessAsUser() failed, GetLastError() = 6
OpenWindowStation() failed, GetLastError() = 5

I was able to resolve the error above by adding the NETWORK SERVICE account to the Administrators group on the web service server but we will NOT be allowed to do that on our customers' servers... The interesting thing was that even if I did not get any error in doc2pdf.log after making the NETWORK SERVICE account an administrator on the server the conversion still did not work until I made all the changes listed on the web page

on the server. I have not tried the example 6 and example 7 listed on the web page

yet. But the approach of the example 6 would not be an option for our customers. And I think I would get the same error above with the example 7.

The same code works perfectly in a console application that runs under the current Windows logon user on the web service server.

Any advice as to how I could make this working is greatly appreciated.

Thank you!

Thanks for your message, this is a limitation of MS Office application. 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, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when run in this environment.

INFO: Considerations for Server-Side Automation of Office

So, if you wish run the conversion from NETWORK SERVICE account, you will have to set MS Word DCOM, MS Excel DCOM run inside an interactive user account, if you don't know how to do, please refer to the changes on the web page.


VN:F [1.9.20_1166]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: +1 (from 1 vote)
How to make docPrint SDK working in IIS 7 under the NETWORK SERVICE account?, 10.0 out of 10 based on 1 rating

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!