We are using classic asp to call a C# dll and in the C# dll we are using System.Drawing.Printing.PrinterSettings.InstalledPrinters to get a list of availabe printers. If the printers are not shared they will not show up when a user trys to print. The Local System account can see and print to them from a VB6 dll and Administrators can print just fine from the C# dll as you might expect. Is there some sort of permissions we need to grant the user so these printers will be available?
As I recall, running a website uses the Network User account, which may not have permission to view local printers.
There was a page on MSDN that said how you can impersonate another user that might have access to the printers, but I've not been able to find it.
Edit: I posted too soon. Here's the page.
HTH
I'm fairly certain that impersonating a user or using their credentials does not constitute the ability to see the printers for that user. I believe explorer.exe reconnects all the network resources (shares/printers) upon logon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With