ESC-POS-.NET
ESC-POS-.NET copied to clipboard
Azure Web App won't let my "online" printer communicate.
Hi,
Orignal Tweet: https://twitter.com/Mafyou/status/1476002420870234112
Clearly, in localhost, it works. But I don't want to use IIS.
Can someone, please, get my "outside" traffic in an Azure Web App. Why is it blocked? Insights?
Thanks a lot.
To reproduce
- Create an ASP.NET DotNet Core PWA based on .Net 6
- Copy/Paste on your Razor page the main ESCPOS_NET with a "NetworkPrinter".
- Put the local IP:Port.
- Try your local computer. It should work.
- Find your public IP.
- Forward the port on your router.
- Try again with the public IP. It should work.
- Publish it on an Azure WebApp. It doesn't work.
Why?
Regards, Mafyou.
You simply can't print from a remote server. You need to run software within the local network of the printer.
I just put a VPN and could be ok. But anyway, I create a new thread, it just don't work, even locally. Thanks for answering!
I ended up creating a small windows service that connects to a Signalr endpoint. When the print is triggered on the server, it sends a Signalr 'new job' and the service connects, grabs the resulting job and prints it locally. It is pretty fast and responsive as well as being lightweight.