问题描述
我有一个不寻常的要求.我有一个具有特定用途的网站,关键的事情之一是能够在客户端计算机上打印到连接到该计算机的打印机.这是一个标签打印机,需要特定的编码,因此我可以通过浏览器进行打印.
我正在研究的一种解决方案是使用WCF.这个想法是,当用户单击打印"时,网页将调用客户端上运行的WCF服务,并将打印作业的详细信息发送给它.然后该服务可以将数据发送到打印机.
客户端计算机在网络上并且正在浏览Internet,Web服务器不在该网络上.那么,服务器如何找到客户端上运行的WCF服务?
我想到的微小变化是在Web服务器上提供了一项服务,客户端定期轮询该服务以查看是否有适合他们的新打印作业.不那么整洁,我仍然需要确保每个客户端都只为他们选择打印作业.区分客户容易吗?
我对WCF还是很陌生,所以我希望自己缺少明显的东西.
谢谢.
Hi,
I have a bit of an unusual requirement. I have a website that has a specific use and one of the key things is to be able to print on the client machine to a printer connected to that machine. It''s a label printer and requires specific coding, so I can print through the browser.
One solution I''m investigating is using WCF. The idea is that when the user clicks print the web page would then call WCF service running on the client and send the specifics of the print job to it. The service could then send the data to the printer.
The client machine is on a network and is browsing the internet, the web server is not on that network. So, how does the server find the WCF service running on the client?
The slight variation I thought of was to have a service on the web server and the clients regularly poll that service to see if there''s a new print job for them. Not as neat, and I still need to make sure that each client only picks up the print jobs for them. Is it easy to distinguish the clients?
I''m quite new to WCF so I''m hoping I''m just missing something obvious.
Thanks.
推荐答案
这篇关于反向WCF-从服务器在客户端计算机上调用服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!