1

I have a isapi *.dll made with Delphi that make and return a PDF on http request. The code works if i build it in a standalone exe, but on a isapi it raise an exception: "Printer selected is not valid".

It seem a ApplicationPoolIdentity issue.

Googling the issue i have found this explanation (https://stackoverflow.com/a/4619757/2936170):

This is likely due to Session 0 Isolation, which was introduced in Vista. Services always run in Session 0, but in XP and earlier, the first user to log in also runs in Session 0, thus allowing services to access that user's desktop (thus allowing for "Interactive" services) and resources (like shares and printers). In Vista onwards, users never run in Session 0 anymore, so services do not have access to user-specific resources anymore. A service has to impersonate the user account it wants to access.

I have also builded the same code in a windows service and installed with admin privilege, it works!

The question is, how configure an ISAPI pool for see the printer?

1

Respond my self.

the correct pool identy is LocalSystem

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.