could not load file or assembly or one of its dependencies

Jun 3, 2015 at 1:47 AM
Hi ! Can you help me on this? when I try to deploy it in IIS 8 it returns an error that could not load file or assembly or one of its dependencies.. When I run it locally, it works fine and it's printing. Need your help guys!!
Coordinator
Jun 3, 2015 at 2:58 AM
Does your server have .net installed?
Jun 3, 2015 at 7:41 AM
Hi Thank you for your response.. It works fine now but my problem is I could not print to the printer.. The printer is installed in my machine and not to the server.. How can I get the printername of my local machine and read it from the server?
Jun 3, 2015 at 8:11 AM
I'm Using s4m Zebra Printer. and it's a USB device. please give me some tips on how to make it run
Coordinator
Jun 3, 2015 at 3:47 PM
When I did it with iis7, I shared my printer, and had to modify the server registry to add the printer under the iis process pool context.

It's much easier and more reliable to use a network printer.
Jun 4, 2015 at 12:13 AM
How to modify the server registry? I'm using IIS 8 and windows server 2012

what should I use?

1.USBPrinter?
2.SpoolPrinter?
3.NetworkPrinter?

This is my current code:
page.AddRange(ZPLCommand.PrintBuffer(1)); //print copies
new PrinterUSB.USBPrinter(ps).Print(page.ToArray());
//new SpoolPrinter(ps).Print(page.ToArray());
Coordinator
Jun 4, 2015 at 3:18 AM
Edited Jun 4, 2015 at 3:20 AM
I assume you don't want to plug your printer into the server, so you'll have to share it from your computer, and have I is use it as a spool printer. This KB article explains setting up your server to use your shared printer. https://support.microsoft.com/en-us/kb/184291/en-us
Jun 4, 2015 at 3:35 AM
I connect to the shared printer from the other computer and write this code
    SettingsOfPrinter.PrinterSettings ps = new SettingsOfPrinter.PrinterSettings();
    ps.PrinterName = "EasyCoder PD42 (203 dpi) - IPL";
    ps.Width = 203 * 4;
    ps.Length = 203 * 1;
    ps.Darkness = 30;

    List<byte> page = new List<byte>();
    page.AddRange(ZPLCommand.ClearPrinter(ps));

    page.AddRange(ZPLCommand.PrintBuffer(1)); //print copies
    //new PrinterUSB.USBPrinter(ps).Print(page.ToArray());
    new SpoolPrinter(ps).Print(page.ToArray());
but nothing is happen..

Why I could not print to their printer?