Cannot print from web application
Posted: Wed Jan 30, 2008 2:26 pm
Hi,
I am developing a web application on Windows XP SP2 - IIS 5 (in production it would need to run on Windows Server 2003 - IIS 6). The app is running as the ASPNET user (would be Default User in Win 2003). This application attempts to print a pdf on the server. It does this by running the config utility to setup the filename etc.
As the web app is running as the ASPNET user, it writes the runonce.ini file to the following location: C:\Documents and Settings\PAUL\ASPNET\Bullzip\PDF Printer. The web application can see the current environment variables on the server, and APPDATA is not one of them.
I then send the document off to the printer and nothing happens. The runonce.ini file is [u]not[/u] deleted.
However, when running the application from Visual Studio, this creates a temp web server running as the logged in user, so PAUL, this process all works (and APPDATA is an evnironment variable).
Also, in the %TEMP% folder (C:\Documents and Settings\PAUL\ASPNET\Local Settings\Temp\BullZip\PDF Printer) there is a port.log and LOTS of _printer.ps files. The port.log reports that printing was successful.
My first question would be whether it is possible to have bullzip look somewhere that is not user specific for the runonce.ini. For example, could a setup value tell it to look at C:\Program Files\Bullzip\PDF Printer\ for the runonce.ini?
Secondly, where might things be going wrong if I am getting port.log saying everything has worked, and a _printer.ps file, but no PDF?
Hope this all makes sense, and thanks in advance for any response.
Paul
I am developing a web application on Windows XP SP2 - IIS 5 (in production it would need to run on Windows Server 2003 - IIS 6). The app is running as the ASPNET user (would be Default User in Win 2003). This application attempts to print a pdf on the server. It does this by running the config utility to setup the filename etc.
As the web app is running as the ASPNET user, it writes the runonce.ini file to the following location: C:\Documents and Settings\PAUL\ASPNET\Bullzip\PDF Printer. The web application can see the current environment variables on the server, and APPDATA is not one of them.
I then send the document off to the printer and nothing happens. The runonce.ini file is [u]not[/u] deleted.
However, when running the application from Visual Studio, this creates a temp web server running as the logged in user, so PAUL, this process all works (and APPDATA is an evnironment variable).
Also, in the %TEMP% folder (C:\Documents and Settings\PAUL\ASPNET\Local Settings\Temp\BullZip\PDF Printer) there is a port.log and LOTS of _printer.ps files. The port.log reports that printing was successful.
My first question would be whether it is possible to have bullzip look somewhere that is not user specific for the runonce.ini. For example, could a setup value tell it to look at C:\Program Files\Bullzip\PDF Printer\ for the runonce.ini?
Secondly, where might things be going wrong if I am getting port.log saying everything has worked, and a _printer.ps file, but no PDF?
Hope this all makes sense, and thanks in advance for any response.
Paul