Troubleshooting printing from IIS web app

About the programming interface for the virtual PDF printer driver.

Moderator: jr

Troubleshooting printing from IIS web app

Postby atarothtoer » Wed Apr 04, 2012 3:44 pm

Hi, i've made a project to convert documents from office to pdf, thanks to your great API, when it run in the visual studio server it's ok, but when i put it into de IIS it fails, don't throw an error message or an exception it just hangs the application. I've modified some registry keys to enable the iisusr to use the printer but it didn't worked. Anybody have any suggestion? Thanks for your attention.
atarothtoer
 
Posts: 5
Joined: Wed Apr 04, 2012 3:33 pm

Re: Troubleshooting printing from IIS web app

Postby sdmaha » Thu Apr 26, 2012 5:52 am

Hi there,
I am also facing a similar issue and from whatever research I have done till now, I believe it to be a permissions issue. So, some folders need Read/Write permissions for the Application Pool user. But, I am still not able to figure out which folder needs what permissions exactly.
I tried giving like "Everyone has Everything" kind of permission for all important folders for BullZip, just out of curiosity, but sill getting the same issue.
The thing is when run from Visual Studio, it pops up an Adobe Reader window temporarily for spooling, but from IIS it does not do that either.
Please let me know if some one was able to solve this issue and how?
sdmaha
 
Posts: 5
Joined: Thu Apr 26, 2012 4:42 am

Re: Troubleshooting printing from IIS web app

Postby admin » Thu Apr 26, 2012 8:18 am

This is a big problem because of all the security involved. I suggest that you place all incoming documents in a folder and have another program listen on that folder. When the program finds a document in the incoming folder it will do the actual conversion and place the result file in another folder. Then the web application just have to wait for the result file to appear. You can communicate status between the two programs using a database or a file format. The external program can run as a service or be started using the scheduling service in Windows.
admin
 
Posts: 58
Joined: Fri Oct 28, 2011 8:09 pm

Re: Troubleshooting printing from IIS web app

Postby sdmaha » Thu Apr 26, 2012 3:13 pm

Thank you, for a quick reply.
So I have created this external program for now and it works well and addresses the issue for now.
However I will still try to troubleshoot this permissions issue for some more time as it will be better for us in terms of application performance if it works inside IIS 7.5.
sdmaha
 
Posts: 5
Joined: Thu Apr 26, 2012 4:42 am

Re: Troubleshooting printing from IIS web app

Postby atarothtoer » Thu Apr 26, 2012 3:59 pm

yes, actually i'm trying the aproach suggested by the admin create a windows service that listen a port where the web app sends the file's folder and name, the service does the printing job and then notifies the web app when its done. Now i'm wondering if i'm using the global settings file for my printing job, when varios users connects, the pdf printer puts the job in queue? or does it need to use the runonce settings file (i'm trying to avoid the use of impersonation in my win service).
atarothtoer
 
Posts: 5
Joined: Wed Apr 04, 2012 3:33 pm

Re: Troubleshooting printing from IIS web app

Postby admin » Sat Apr 28, 2012 6:46 am

You may be able to use some of the tricks related to sharing the printer. See the link below to get hints regarding impersonation and setting directories for various file operations.

http://www.biopdf.com/guide/examples/network_sharing/
admin
 
Posts: 58
Joined: Fri Oct 28, 2011 8:09 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron