0

Im trying to print a generated pdf on my web app in c# asp.net. Im using iis. I need to print the file on a specific printemps over our network. The fact is that in my dev server environnement, in debug, everything works well. I use process.start(foxitreader exe, the file, and the printer)

But when i release the app, on the prod server ,no more printing. All i got is the process of the terminal and foxit reader showing in task manager, but that’ it.

My question is : is there a way to print my file with This configuration ?

I tried to launch the powershell command directly in terminal, it worked on Both server. I tried to launch a ..bat file directly that open the powershell script, it worked as well. But from the app, i still can’t figure how to make it work

  • 1
    When the App runs on the Server, it pretty probably runs with Service credentials and pretty probably won't have the same rights and privileges as your user does (for example access to network printers). You may want to check that. – Fildor Feb 15 '23 at 07:57
  • Are you sure foxitreader exe can run without a user logged in and without a desktop? Are you sure the service account has access to the printer? – Klaus Gütter Feb 15 '23 at 07:57
  • This might be useful: https://stackoverflow.com/questions/7990/printing-from-a-net-service – Klaus Gütter Feb 15 '23 at 07:58
  • @Fildor i checked that a bit too, maybe not enought. When Im in the dev server, in debug, i cane sens my file on the printer. In the printer history, it.s Shown that the server had sended the printer, not the logged user on the app ( adfs sso) . Pretty tricky for me Apt This point – Shandrisch Feb 15 '23 at 09:05
  • . So Yeah @KlausGütter for now i cant use foxit with the powershell command and the app istself in debug ( with the server account) . – Shandrisch Feb 15 '23 at 09:05

0 Answers0