PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
ProcessModule Access is denied Error https://forum.pdfsharp.net/viewtopic.php?f=2&t=2689 |
Page 1 of 1 |
Author: | smacky311 [ Thu Dec 19, 2013 5:03 pm ] |
Post subject: | ProcessModule Access is denied Error |
When I call printer.Print(); a Win32Exception "Access is Denied" error is thrown. The error occurs on PdfFilePrinter.DoSomeVeryDirtyHacksToMakeItWork() line 210. I am going by the PdfPrint sample project included with the PDFSharp download. My code is very basic: Code: PdfFilePrinter.AdobeReaderPath = adobeReaderLocation;//Path to AcroRd32.exe on windows 8 machine
var printer = new PdfFilePrinter(_filePath, _printerName); try { printer.Print(); } |
Author: | Thomas Hoevel [ Thu Dec 19, 2013 5:07 pm ] |
Post subject: | Re: ProcessModule Access is denied Error |
Access denied means your not permitted to do this. Try running your code with administrator privileges. |
Author: | smacky311 [ Thu Dec 19, 2013 5:11 pm ] |
Post subject: | Re: ProcessModule Access is denied Error |
Can you be more specific? Are you referring to programmatic elevation? I am running this code in the visual studio 2012 debugger in Administrator mode. The issue occurs during the iteration of processes. When it reaches the process "sppsvc.exe" - Microsoft Software Protection Platform Service. In taking a closer look I noticed that this little block of code is configured to swallow exceptions. I only noticed because I always run my debugger configured to stop on all CLR thrown exceptions. So this is just a well named piece of code DoSomeVeryDirtyHacksToMakeItWork() doing some naughty things... I'll go ahead and ignore it.... |
Author: | Thomas Hoevel [ Thu Dec 19, 2013 5:24 pm ] |
Post subject: | Re: ProcessModule Access is denied Error |
Sorry, forget the first post. There is a try/catch around line 210 and a few exceptions will be OK. You can tell the debugger not to break on such exceptions if they are handled in code. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |