Forum How do I...?

Win Server R2 & C# .Net Application

JoseVega
Hi,

My problem is that, i installed Prince on my server, and I have an app that is generating PDF's from html files, when I run the app locally, works great (like always) but when I run the same app on the server it just don’t work.

The prince.exe its being executed because i get data on the log file and the response from the .Convert function is false.

I gave the app pool user permissions, FULL CONTROL to de hard drive, I set the prince.exe to run as administrator, i think i gave the user the correct permissions, but, no pdf !!..

This is my code: (C#)

Prince prn = new Prince("C:\\Program Files (x86)\\Prince\\Engine\\bin\\prince.exe");
prn.SetHTML(true);
prn.SetLog("C:\\PrinceLog\\Log.txt");
blrep= prn.Convert(newHTMLfileName, newPDFfileName);
swLog.WriteLine("PrinceLog: " + prn.ToString());

The 2 file paths are valid.

Any known issue? Or something?
mikeday
Do you get any output in the log file?
JoseVega
I solved the problem!!..

Solution!!..

Give more permission to the app pool user on.
- C:\Program Files (x86)\Prince\Engine\style
- C:\Program Files (x86)\Prince\Engine\license
- ETC..

prince.exe also uses those folders (READ), so, this “tips” must be placed somewhere!! ;)

Regards.



mikeday
Great, thank you for posting the answer here. :)