Skip to content

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

sagar shinde

Asked Jul 9, 2014, 5:36 AM EDT2 answers
Share
LinkedInX
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
Code
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.

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Vithal Wadje
    0
    create role in database and after login particular user save his or her role in session and according to that role gives the acces of printer function
    0
  • 0
    I dont want to provide access to printer, i want to know if user has access rights on printer or not, If i get this info then will stop executing further.
    0