Hi i am getting this exception when i am trying to create printserver object. Here is my code
Code
PrintServer printServer = new PrintServer(@"\\" + printServerName);
PrintQueue printQueue = printServer.GetPrintQueue(printerName);I trying to get the printers from another machine which is windows server 2012, same code works fine if i try to acess some OS based system. Any help will be appreciated. Thanks in advance

Shweta LodhaRank #31 · 39.8K reputationPosted Apr 10, 2014, 8:20 AM EDT
give a try to this:
1) Go to Control panel
2) Turn Windows feature on or off
3) Click on checkbox 'Print and Document service'
4) Install
sagar shinde17 reputationPosted Apr 13, 2014, 11:04 PM EDT
Shweta LodhaRank #31 · 39.8K reputationPosted Apr 14, 2014, 7:07 AM EDT