Forum How do I...?

asp.net, iis, security, and prince xml

nathan
Hi, I have an asp.net website that needs to be able to generate pdf files from pages within the site via a button click event. It worked fine locally but now trying to test it on our development servers is causing a lot of issues and it will not generate the pdf files. It creates 49-50 processes on a Windows 2003 Server running IIS 6.0 when the call to prince is made only once. It ties up resources and basically crashes the sites we have on the dev server. I think this has something to do with permissions for the site but we are pretty restricted as to what permissions we can allow as this client will be hosting the site themselves once it is developed.

Has anyone out there encountered this problem and if so would you please tell me how the asp.net site permissions need to be setup in order for this to work?

Thank you,

Nathan
mikeday
This doesn't sound like a permissions issue, if it is creating many Prince processes. It sounds more like some kind of recursive loop issue, where a page is calling Prince that is calling the page that is calling Prince, and so on. Which Convert() method are you calling?
nathan
Hi Mike,

Thanks for your reply. I am calling the .Convert method and passing in a url of the page that needs to be converted to pdf along with the output path/filename. It works like this, the user clicks a button on one of the pages which fires a Response.Redirect to the pdf.aspx page which handles generating the content and calling into a custom class that contains the call to prince.convert. I just tested using some counters that I stored in session (to make sure they weren't getting reset to 0) that it is only being called 1 time and it's only being called once. It spawns processes and creates pdf's of the same content until I stop the web site in iis manager.

Has anyone else had this kind of problem or seen this behavior before?

Here are a few of the log file entries, no need to post them all as they are the same or the same pattern. First time looks fine, but after that it has resolving cross-reference each time but I wouldn't think that would be causing this issue.

Wed Jan 12 10:42:22 2011: ---- begin
Wed Jan 12 10:42:22 2011: Loading document...
Wed Jan 12 10:42:23 2011: Converting document...
Wed Jan 12 10:42:23 2011: finished: success
Wed Jan 12 10:42:23 2011: ---- end
Wed Jan 12 10:42:21 2011: ---- begin
Wed Jan 12 10:42:21 2011: Loading document...
Wed Jan 12 10:42:23 2011: Converting document...
Wed Jan 12 10:42:23 2011: Resolving cross-references...
Wed Jan 12 10:42:23 2011: finished: success
Wed Jan 12 10:42:23 2011: ---- end
Wed Jan 12 10:42:20 2011: ---- begin
Wed Jan 12 10:42:20 2011: Loading document...
Wed Jan 12 10:42:23 2011: Converting document...
Wed Jan 12 10:42:24 2011: Resolving cross-references...
Wed Jan 12 10:42:24 2011: finished: success
Wed Jan 12 10:42:24 2011: ---- end
Wed Jan 12 10:42:19 2011: ---- begin
Wed Jan 12 10:42:19 2011: Loading document...
Wed Jan 12 10:42:24 2011: Converting document...
Wed Jan 12 10:42:24 2011: Resolving cross-references...
Wed Jan 12 10:42:24 2011: finished: success
Wed Jan 12 10:42:24 2011: ---- end

Thanks,

Nathan
nathan
Problem solved. The call was made inside the aspx page that was generating the html which was then passing it's own url to the prince.convert method and re-loading the page. It was a page loop.

thanks