PDFsharp & MigraDoc Foundation http://forum.pdfsharp.de/ |
|
major issue with my website when launching pdfs http://forum.pdfsharp.de/viewtopic.php?f=2&t=2240 |
Page 1 of 1 |
Author: | silentbob [ Fri Nov 23, 2012 4:22 pm ] |
Post subject: | major issue with my website when launching pdfs |
Hi I have set up a website on my dev server and when I test the page it creates the pdfs no problem. When I move them to my prod server almost everything fails to work. for example it looks for images and areas to save the pdfs on the c: drive instead of within the folder of the website. it doesnt matter if I specify the location of the image it still defaults to the c: drive so if I have Code: Dim image As XImage = XImage.FromFile("\\servername\drive\folder1\folder2\folder3\folder4\logo.png") or Code: Dim image As XImage = XImage.FromFile("/images/logo.png") it wont display the image and throws and error. Also on when it tries to save the document using Code: document.Save(filename) it throws an errorCan anyone help? |
Author: | Thomas Hoevel [ Mon Nov 26, 2012 1:07 pm ] |
Post subject: | Re: major issue with my website when launching pdfs |
Hi! The Application Pool on the Web Server must use an account with sufficient rights to read and/or save the files where you want to have them. For a quick test, you can create an Application Pool with "Local System" as user. If that works, than create a new user for your application and give that user only the required rights on your disks. |
Author: | silentbob [ Wed Nov 28, 2012 1:56 pm ] |
Post subject: | Re: major issue with my website when launching pdfs |
Hi thanks for adding a reply. if I use the short path to the folder it doesnt work at all (images/image.png) even on the dev server as it seems to default to using the C drive is there anyway I can force it to use the images folder within the solution regardless of where I put the solution (for example on the production server) the same goes for the location of when it tries to save the document. |
Author: | Thomas Hoevel [ Wed Nov 28, 2012 2:19 pm ] |
Post subject: | Re: major issue with my website when launching pdfs |
Relative paths (like images/image.png) are relative to the current directory. You can set this using Environment.CurrentDirectory. |
Author: | silentbob [ Wed Nov 28, 2012 5:34 pm ] |
Post subject: | Re: major issue with my website when launching pdfs |
Excellent thanks I will have a look and report back. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |