title: Dymo SDK cannot find printer
body: <p>I have installed <code>DYMO_Label_v.8_SDK_Installer.exe</code> and the default v8.x label printing software. The code runs fine on my machine, but when I publish it to an iis server it gives me this message:</p>
  
  <pre><code>&lt;Error&gt;
    &lt;Message&gt;An error has occurred.&lt;/Message&gt;
    &lt;ExceptionMessage&gt;Printer '\\pcname\DYMO' is not found&lt;/ExceptionMessage&gt;  
    &lt;ExceptionType&gt;System.InvalidOperationException&lt;/ExceptionType&gt;
    &lt;StackTrace&gt;   at System.Web.Http.ApiController.&lt;InvokeActionWithExceptionFilters&gt;d__1.MoveNext()
       --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.Http.Dispatcher.HttpControllerDispatcher.&lt;SendAsync&gt;d__0.MoveNext()    
    &lt;/StackTrace&gt;
  &lt;/Error&gt;
  </code></pre>
  
  <p>And the strange thing is that I have added the <code>\\pcname\DYMO</code> and can print to it. When I browse to \pcname it shows me this shared <code>dymo</code> printer.
  Everything works when I run my code locally, but when it is deployed with the same settings in the web.config it cannot find the printer?</p>
  
  <pre><code>StringBuilder sb = new StringBuilder
  var label = DYMO.Label.Framework.Label.Open(System.Web.HttpContext.Current.Server.MapPath(@"~/Content/thelabel.label")); // mvc webapplication
  label.SetObjectText("Address", sb.ToString());
  label.Print(ConfigurationManager.AppSettings.Get("printername"));
  // printername = \\pcname\dymo
  </code></pre>
  
  <p>Now I have read something about 32 and 64 bit versions of the sdk, but that would give me a different error right? local testing is also on a x64 machine. No iis, but iisexpress or developmentserver I think. And the sdk that I have downloaded is the latest I think, which should work for both x86 and x64 machines according to the dymo blog.</p>
  
  <p><strong>Edit</strong> This code does not list any printer. But the dymo software can print (from the same pc). the labelprinter is listed when I look at the printers in the windows controlpanel.</p>
  
  <pre><code>StringBuilder sbPrinters = new StringBuilder();
  DYMO.Label.Framework.Printers p = new DYMO.Label.Framework.Printers();
  foreach(var printer in p.ToList())
  {
      sbPrinters.AppendLine(printer.Name);
      sbPrinters.AppendLine(printer.ModelName);
      sbPrinters.AppendLine(printer.IsConnected.ToString());
      sbPrinters.AppendLine(printer.IsLocal.ToString());
      sbPrinters.AppendLine("-==========-");
  }
  return sbPrinters.ToString(); // empty...
  </code></pre>
  
  <p><strong>edit2</strong>
  just tested it at win2003 on .net 4 instead of 4.5 and it does not list any printers. 
  So both 2003 and 2012 do not work. Windows 8.1 does work. Same code, same network shared printer. The dymo label v8 software can print from 2003, 2012, 8.1. so the printer is installed properly. I also tried impersonation in the web.config on 2003 to run as administrator. But that did not work.
  When I ran this command in the screenshot below and copy pasted the printer name into the web.config file it still cannot locate the installed printer.</p>
  
  <p><img src="https://i.stack.imgur.com/TGUuZ.png" alt="enter image description here"></p>