Impersonation and Printing server-side

  • Thread starter Thread starter joerage
  • Start date Start date
J

joerage

I use impersonation to get the printers installed on the web server.

What I have found out is that the impersonated user MUST be logged on
the web server so that a client browser sees the list of printers
correctly.

I would like to know if my conclusion is correct and if there is a way
to resolve that.

My goal is that my web application gets a drop down of the printers
installed on the web server. Then using PrintDocument.Print() sends a
document to the printer.

Any ideas would be welcome.

Joe
 
joerage said:
I use impersonation to get the printers installed on the web server.

What I have found out is that the impersonated user MUST be logged on
the web server so that a client browser sees the list of printers
correctly.

I would like to know if my conclusion is correct and if there is a way
to resolve that.

My goal is that my web application gets a drop down of the printers
installed on the web server. Then using PrintDocument.Print() sends a
document to the printer.

Any ideas would be welcome.

Joe

I suspect this is related to the fact that when you impersonate a user,
their profile isn't loaded. Some (all?) printers are associated with
users rather than the machine. If you need the full profile available,
welcome to a whole world of P/Invoke.

For starters, check whether a call to LoadUserProfile() helps you?

Damien
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top