none
Print ticket service failed to bind to printer Win 32 Error RRS feed

  • Question

  • I have fully functioning and stable XPS creation (.Net 4) and printing (.Net 4.5)  server side web services, however I do have one issue. I also have an admin web site (asp.net mvc 4 on IIS7.x) that iterates through my client's print servers, extracting the print queues and retrieving the print capabilities (queue.getprintcapabilitiesasxml) which are then deposited in an SQL database for print job use. This site is run when support adds or removes printers or changes printer drivers on print servers so that the tray namespaces and URIs are always correct for each printer.

    The issue is this...When I run this admin code from VS2010 (.Net 4) on my desktop (win 7 x64)everything works correctly and I receive all the printer information I require, however when I deploy to IIS (7.5 2008 R2) and run the site, one print server (virtual 2008 R2) reports that "Print ticket service failed to bind to printer Win 32 Error: Unknown printer driver" for the printers I'm targeting (Sharp printers). As stated, this print server is virtual whereas the others are real and Sharp printers exist on the other print servers. I thought this might be a permissions issue so I tried running the site's app pool identity as my own domain account, which didn't work, so I tried impersonation and that didn't work. The virtual print server flat out refuses to pass info back to the IIS server but will happily pass it back to my desktop (all other things being equal). I'm at a bit of a loss on how to investigate this, so I'm asking for help here.


    • Edited by nomadNet Monday, June 3, 2013 3:32 PM
    Monday, June 3, 2013 3:31 PM

All replies

  • Hi NomadNet,

    Welcome to the MSDN Forum.

    I would like to suggest you to enable 32bit application on 64bit IIS: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/405f5bb5-87a3-43d2-8138-54b75db73aa1.mspx?mfr=true 

    And for further more information, please try IIS forum: http://forums.iis.net/  Since this issue is more related to IIS setting.

    Thanks.


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, June 4, 2013 1:10 AM
    Moderator
  • Mike, I've posted on the IIS forum with no responses, so I thought I'd drop an update here.

    The server in question is 32 bit 2003 virtual, however the printing web service that talks to it is .Net 4.5 anyCPU and is able to modify and create job scoped, tray targeted user print tickets on that server using the namespace and URI data without issue.

    It is only when queue.getprintcapabilitiesasxml (.Net 4) on the admin service is called do I have issues, so it is kinda wierd that one service wont can't get data, but another service can use those data to manipulate tickets. Both services are on the same IIS server but under different host headers.

    The domain app pool identity for the admin service is set to allow 32bit to run.

    There appears to be an MS bug report no.113040910349062 which details a similar sort of thing with Win 8 server 2012 and as noted in this thread...

    http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/fdcfa0fa-50aa-4a61-be79-5b4c8f65fbf7/

    Tuesday, June 4, 2013 2:15 PM
  • Hi NomadNet,

    I am trying to involve some other one into this case, It will take some time, thank you for your patience.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 6, 2013 1:02 AM
    Moderator
  • Thank Mike...I was on site yesterday about this and the issue remains. If I set up the IIS web service to run under my account as the app pool identity to equalise everything (same account, same code) the issue remains so the only difference I can see is that I have a workstation or a server making the request. These are in different OUs. Both machines appear to be able to "set" capabilities on the virtual server, but only the workstation can "get" capabilities, if that makes any sense. The only thing I can equate this to is when you first build asp.Net apps and you find that your code works in VS on a w/s  but not on the IIS server because you didn't understand how security works.

    I've checked permissions on all printers on all print servers and they are all the same, so it's not that.

    So to clarify, from either w/s or server I can attach to the print server and iterate the queues, but as soon as I hit getcapabilitiesasxml I get bombed when calling from the server.

    Luckily, this admin code is run rarely (when printers are changed) and the client is happy (at the moment) to run it from a workstation.

    The client is going to run an RSOP to see if anything shows up.

    Thursday, June 6, 2013 8:48 AM
  • Could you please check the permission based on the IIS version which you are using

    IIS 6: http://support.microsoft.com/kb/812614

    IIS 7 and above: http://support.microsoft.com/kb/981949

    Could you also send us the exact error message with call stack and also if there is any error/warning in event logs ?

    Wednesday, June 12, 2013 12:16 AM
  • Hi Puneeth...I'll get them to check the IIS perms (IIS 7.5). There is nothing in any of the event logs (either in IIS or the virtual server). I'd love it if there was. I'll have to go back to site for the call stack info.
    Wednesday, June 12, 2013 7:47 AM
  • Hi Puneeth...IIS checked as per your list...Permissions correct, save 1 change . No change to result. Awaiting results of the RSOP.
    • Edited by nomadNet Thursday, June 13, 2013 7:44 AM
    Thursday, June 13, 2013 7:44 AM
  • Hi NomadNet,

    We need to further investigate the problem based on the callstack information and understand what troubleshooting steps has to be performed.
    Due to the nature of this issue, your question falls into the paid support category which requires a more in-depth level of support.  Please visit the below link to see the various paid support options that are available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone


    Friday, June 21, 2013 7:24 PM
  • Hi Puneeth...I'll contact my client. They already have a paid support package. I'm still waiting for them to come back to me with various test results, but as the problem only affects one virtual server during an admin refresh and can be worked around by using a workstation, the issue probably isn't a top priority for them at the moment. As I say, I'll check.
    Wednesday, June 26, 2013 6:13 AM
  • I finally got back on site and below is the stack trace info....

    The calls are successful on other print servers returning...

    Success for...Auto Select ns0000:Auto <PRINTERNAME> on <PRINTERSERVERNAME> driver:
    http://schemas.microsoft.com/windows/printing/oemdriverpt/SHARP_MX_7001N_PCL6_5_2_3790_2_

    Success for...Tray1 ns0000:User0000000257 <PRINTERNAME> on <PRINTERSERVERNAME> driver: http://schemas.microsoft.com/windows/printing/oemdriverpt/SHARP_MX_7001N_PCL6_5_2_3790_2_

    etc, etc, etc, etc...

    Success for...LCT ns0000:User0000000272 <PRINTERNAME> on <PRINTERSERVERNAME> driver: http://schemas.microsoft.com/windows/printing/oemdriverpt/SHARP_MX_7001N_PCL6_5_2_3790_2_

     

    Success for...Auto Select ns0000:AutoSelect <ANOTHERPRINTERNAME> on <PRINTERSERVERNAME> driver: http://schemas.microsoft.com/windows/printing/oemdriverpt/Lexmark_T654__MS__6_1_7601_17514_

    Success for...Tray 1 ns0000:Tray1 <ANOTHERPRINTERNAME> on <PRINTERSERVERNAME> driver: http://schemas.microsoft.com/windows/printing/oemdriverpt/Lexmark_T654__MS__6_1_7601_17514_

    Success for...Tray 2 ns0000:Tray2 <ANOTHERPRINTERNAME> on <PRINTERSERVERNAME> driver: http://schemas.microsoft.com/windows/printing/oemdriverpt/Lexmark_T654__MS__6_1_7601_17514_

    etc,etc,etc...

     

    The error below and stack trace is only generated from IIS 7 against a virtual print server, although it works fine on my Win 7 WS against the same virtual print server. Account used in both instances is my account. .Net install on both machines is the same (.Net 4 + .Net 4.5) I'm using .Net 4 for the code.

     

    ERROR: <ANOTHERPRINTERNAME> on <VIRTUALPRINTSERVERNAME>

    Details... PrintTicket provider failed to bind to printer. Win32 error: The printer driver is unknown.

    at MS.Internal.Printing.Configuration.PTProvider..ctor(String deviceName, Int32 maxVersion, Int32 clientVersion) at MS.Internal.Printing.Configuration.PTProviderBase.Create(String deviceName, Int32 maxVersion, Int32 clientVersion) at System.Printing.PrintTicketManager..ctor(String deviceName, Int32 clientPrintSchemaVersion) at System.Printing.PrintQueue.GetPrintCapabilitiesAsXml()

    at printServicesAdmin.commDal.printServerData.GetAndSetQueueInfo(printserverInfo psi)
    in <PATH_TO_CODE>\printServerData.cs:line 43

     

    Repeat the same ERROR and stack trace for all printers on this print server when run from IIS.
    My code line 43 is MemoryStream ms = pq.GetPrintCapabilitiesAsXml();

    HTH

    Tuesday, July 2, 2013 4:40 PM