This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C#/DotNet Iprint errors - The printer name is invalid

Hi Legends.  I'm hoping to pick your brains and get some help.

I'm working at a site where there is a iPrint deployment using short printer name  (eg  \\Site\AA123456-p6 ) as the installed printer names.

When we select this printer name  and try to print within our application/test tool written in DotNet we get a generated error stating that the printer name is invalid.  the FQDN port ipp://iPrint.Server.FQDN.com/iprint/AA123456-p6 does resolve and i can browse via the HTTP address.  The short name \\Site does not resolve by ping or DNS nslookup on the host system
no matter what I do or configure I cannot get this printer to work.

The only threads and info I can find about this are 10 or more years old and don't seem to address my issue.

The code for our test tool is as follow;

private static System.Printing.PrintServer GetPrintServer(string servername)
{
System.Printing.PrintServer ps = null;
if (string.IsNullOrEmpty(servername))
{
// local printer name
ps = new System.Printing.LocalPrintServer();
}
else
{
// network printer share
ps = new System.Printing.PrintServer(servername);
}
return ps;
}

public static System.Printing.PrintQueue GetPrintQueue(string printServer, string printQueue)
{
System.Printing.PrintQueue pq = null;
System.Printing.PrintServer ps = GetPrintServer(printServer);
if (ps != null)
pq = ps.GetPrintQueue(printQueue);
return pq;
}

When we try to resolve the short name it fails.  Are we missing something when trying to call GetPrinterServer?
'Print and Document service' is installed.
Test tool is here: https://drive.google.com/file/d/1746kgmWbCIchqxkBZqjP5RDZrN7QhVXC/view?usp=sharing if you have a similar site and can try to replicate?

Any help is really appreciated!

Tags:

Parents Reply
  • 0 in reply to 

    As this is a community forum (not official support) and you haven't received a response yet, I'm assuming no one has run into this problem or knows a resolution.  Quite honestly, I've never implemented short printer names and have no experience with them.  If you can't get anywhere with this, you might consider opening a support request.

Children
No Data