West Wind .NET Tools and Demos
Error accessing temp folder
Gravatar is a globally recognized avatar based on your email address. Error accessing temp folder
  Bob Powell
  All
  Apr 5, 2019 @ 01:36pm

I am using the wwPDF class to print to PDF using the Windows Print to PDF printer driver on a Windows Server 2016.
oPDF = CreateObject("wwPdfPrinterDriver") oPDF.cPrinterDriver = "Microsoft Print to PDF" && the name of the printer

The error I get is: Printing failed: File access is denied d:\temp.mem

Where is it coming up with the d:\temp.mem folder?

Thanks, Bob

Gravatar is a globally recognized avatar based on your email address. re: Error accessing temp folder
  Rick Strahl
  Bob Powell
  Apr 5, 2019 @ 10:45pm

Not sure. Is that path correct? D:/temp specifically?

The temp path is set through environment varsity make sure the temp Path is valid...

Rick

Gravatar is a globally recognized avatar based on your email address. re: Error accessing temp folder
  Bob Powell
  Rick Strahl
  Apr 8, 2019 @ 12:52pm

Actually the folder it seems to be looking for is "d:\temp.mem" . I don't find that any any system variable..

Also, if I simply print the report to the Microsoft Print to PDF printer, it works and writes the pdf to the desktop.

I feel that it is server or permissions, because on an Azure Terminal Server, it works.

Permissions on the Printer is set to allow Print for Everyone.

I am at a loss as to what to try next.

Gravatar is a globally recognized avatar based on your email address. re: Error accessing temp folder
  Rick Strahl
  Bob Powell
  Apr 8, 2019 @ 01:23pm

I don't know either because that file is not generated by Web Connection - it's coming from the PDF driver. Are you running on Azure? I think Azure sets the temp path to the local D: drive which is a impermanent SSD drive attached to a server instance. What are the permissions in that folder (if it exists)?

Where exactly is this happening? On your dev box or a deployed server? Both?

On a server it could be permissions for the application Pool - make sure the AppPool has rights in that folder. You might also have to set the option in the App Pool to use a user profile so that the temp variable is properly set in the environment. However, I don't do that on my server and the Microsoft PDF Driver works in my app (running under Network Service).

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Error accessing temp folder
  Bob Powell
  Rick Strahl
  Apr 8, 2019 @ 01:38pm

It is is permissions. I ran the application using "Run As Administrator" and it works without error. This is on a client's server, I will need to find out from them why it is being denied for the normal users.

Thank you again for you support. Very much appreciate it. Bob

© 1996-2024