sagar shinde

sagar shinde

  • NA
  • 17
  • 12.7k

How to know if user has access rights(like print, manage doc

Jul 9 2014 9:36 AM
I want to know if the user has access rights on network printer or not. My scenario is i am using system.printing library to get the printer information, but when i try to create object Printqueue then the following statement never completed its execution. here is the sample code for it
PrintServer printServer = new PrintServer(@"\\" + printServerName);
PrintQueue printQueue = printServer.GetPrintQueue(printerName);
Second statement never completes its execution in case if network printer has no rights to user. So before doing this i want to know if it is possible to check the rights on the printer. Please let me know any one has face this issue and has any solution for this.

Answers (2)