Search code examples
vbscriptghostscriptpermission-deniedwsh

GhostScript on IIS6 causing Permission Denied error


I'm running a server with Windows 2003 and IIS 6.0. I'm using GhostScript to create pdf's that are a subset of pages from the full text using WScript.shell. The line (111) that is giving me the error message is:

iReturn = oShell.Run(gs\bin\gswin32c.exe -sDEVICE=pdfwrite -q -dNOPAUSE -dBATCH -sOutputFile="temppdf\pdfpp2_5.pdf" -dFirstPage=2 -dLastPage=5 "pdfComplete\LargeFile.pdf", 0, true)

--Most is done through scripting and variables, I've filled out file names just for continuity.

Here is the error message:

Microsoft VBScript runtime error '800a0046' Permission denied sendpdf.asp, line 111

I have given the IIS user full permissions on all folders involved. Does anyone see anything that I am missing or have a thought where I should go from here? Thanks!


Solution

  • To solve this issue... Go to IIS Manager --> Local Computer -->Application Pools. Then, right click on DefaultAppPool then select Properties Under the Identity Tab, check how your system is running them An update evidently changed mine from "Configurable" so I can list what I want and set it to "Network Service". If you are VERY confident in your security (or are just using it for Intranet or the like), you could set it to "Local Service" or "Local System", but I would highly recommend against that except in extreme cases. A day full of research is complete!