ASP.NET Web service generate DUPLICATE print jobs - c#

I am develop a ASP.NET (SOAP) web service for print KOT/BOT print outs . I am using "PrintDocument" class for handle print jobs and the printer is Epson TM U220 network printer. The problem is when calling the print web method sometimes its generate DUPLICATE print outs. But according to my system logs, from the web method call print function only onetime, but from the Printer (Epson TM U220) generate same print out twice. Also this not happening every time. We are also unable figure out in which point this issue is occur.
Also this problem not occurring in our office testing environment. This happening our one client site only. Customer complain time to time, system generate DUPLICATE KOT/BOT printouts. And also their not using dedicated server PC for the IIS server and SQL server database. Their using standard shared PC for system. So is this a problem of the web service, IIS server or the Hardware (System PC or LAN Network communication between PC and the Printer)?

By the way is this AutoCutter or not? Epson has a "Serial emulation driver" that makes a USB printer act like it's on a real serial port. Then you can use direct-to-port in Campground Master, set up as a serial printer and test it whether its keep hapenning duplicate printing. but you might need to use service to talk to port in the destination computer (local port printing) we did sometime when we had simillar issue.May be this help to you

Related

how to access usb port of client pc from web app

I have a web app. now I want to add "present and absent by finger print" to this. everything work fine in localhost (add finger,remove finger and etc). I send device port name to functions to do jobs.
but after publishing project I recognized that it can not find port in client's pc.
now I want to now how can I access specific port in client's pc after publishing web app?
PS:if you need to know part of code just say it to show you, thank you
Browsers don't let you to do it on purpose. However, you can create ActiveX objects, plugins or browser extensions to do it.
For example you can check this
I have understand the best way is windows application, so I did my job by creating c# windows application and did my job as well as I wanted.

Accessing RFID reader on client with MVC 5 .net application

I am developing a browser based application which will read RFID whose driver is stored on the client machine on specific location say c:\RFIDReader.exe.
When this application will run it will return the id number as output.
I am able to read the output if I run this application on the server machine (So far I have only tried in debug mode).
But the actual problem is this application will be running on the client machine and the device (scanner) will attach to the client machine.
I am not able to figure it out how can I do that because on the client machine the only browser is the mediator talking to the server.
I am sure this is possible because there is lot of websites which accesses their service application running on client machine for example screanleap.com
Anyone can suggest me what can I do to access the RFIDReader.exe and get the output back and send it to the server.
Im not sure how screanleap works but I would think is the same as teamviewer. In the link I see
a quick one-time download may be required
This suggest that the client machine have a client made by screanleap running that will communicate with the server.
I would suggest making a client app that will launch RFIDReader.exe and send the info to server.

Printing WCF - network printing issues [duplicate]

I get the error mentioned when printing to a network printer.
The error does not occur when run under XP/Win2003, in a WinForm app or when a local printer is used.
The error does only occur when run as a Windows Service under Vista/Win7/Win2008 and printing to a network printer.
The Windows service runs under a network user that has access to the network printer. Before I print I check if the printername (including network path) is ok by looping through the available printers.
How can this be solved?
Solved by adding the printer to the SYSTEM user via a registry hack as described in the Microsoft doc: http://support.microsoft.com/kb/184291/en-us.
For anyone that stumbles across this issue in the future.
Double check that your Printer Name is correct as it could also be the reason you might be getting this error.
In my case we got same error for windows 10 os client computers.
I think the error is related users and their permissions.
After making the client computers to our company's domain the error was fixed.

Network printing with window service

I have a friend who did the same thing with window form.
What I need is to make this to a window service.
The Window service program (printing controller service) will be used as a central printer controller.
Depending on the condition, I will send the printing job to different printer on the network (the printer is installed on USB).
It is already possible to do a test print, but when I list down the installed printers, these network printers are not listed.
But in my friend's program, all he need to do is to set the printer name to the ip address of the machine, and for that machine, just make sure that it is set to the default printer.
Once my friend set the ipaddress and trigger print, it will be printed to the correct printer. But for my case, the window service already did not list down the network printers, it will not print if printer name is wrong.
For my window service, I'm using Local System.
heard about creating a local port with the relevant IP address of the printer, but have yet to manage to test.
Hope that someone is able to give some guidance
Printing from a windows service is not recommended. Windows service runs in background and have no UI.
You can look into:
Print html document from Windows Service in C# without print dialog
EDIT
"For my window service, I'm using
Local System."
I guess you need to use a different account for your service,( domain account) so that you can access network resources.
Have sort of gave up on using window service, as when I log down the printers my computer can access, it will only show only those installed locally, those network printers are not recognized somehow.
Tried with standard TCP/IP port, have no problems setting up, but unable to even do a test print.
Decided to trade off by using window form, setting the default printer according to the mapping and issue a print command. Tested and it worked. This way, the user will only need to login the computer each day, but the advantage is that there will be no issue for the need of additional settings with regards to permission and access rights

Printing Server Side from .Net (without WinForms)

Hey printing junkies need some pointers to send me in the right direction for this development.
I am developing an epos system for a local shop which we are later going to tie into an ecommerce site.
The front end of the epos system is going to be WinForms so we can handle USB devices easily and we are going to use a WebForms/MVC admin console.
One area we are inexperienced in is printing. We need to print barcodes, and wish to do this via the admin console (web based).
So (finally) the question. Where do we start looking for code that will allow us to print directly to a connected printer from the server (IIS) instance of .net from the webforms.
System.Drawing.Printing
http://msdn.microsoft.com/en-us/library/system.drawing.printing.aspx
Creating the document is a lot like creating a dynamic image. I have not actually sent a document to the printer from a web app, but I don't see why you couldn't.
Your Web app will probably have to use remoting to connect to a Windows service running on the same machine (or pick your favorite IPC mechanism—perhaps a queue in a database). This service can run in an full trust context and should be able to print for you.
You can set up a local printer, that just passed traffic through to the network printer. This is easier to set up that printing direct to a network printer. See link text

Categories

Resources