How to get Client PC Printer name using C#.net - c#

I am currently developing a web application to print data directly to the client's printer. The application works well in my pc but when I post the application to our web server, instead of retrieving the printer list in client's pc, the application is trying to look for printers that are installed in the server machine.
I developed my application using C# and I am using System.Drawing.Printing.PrinterSettings.InstalledPrinters to retrieve the printer list I realised it only trying to retrieve printer installed in the local machine. The PC is not connected to any network.
Is there any way to get the list of installed printer in the client computer?

System.Drawing.Printing.PrinterSettings.InstalledPrinters will give the list of printers where the application is hosted and i am afraid there is nothing like getting clients printer lists in ASP.Net.

Related

Quickbooks Pro 2021 access from remote computer

I have a WinForms (QuickBooks SDK) application that saves some bills to QuickBooks. We are currently running both the application and QuickBooks on the same server. I am trying to move the application to a different computer located on the same LAN but am getting errors when connecting. Do both the company file and the application need to be on the same computer to access and make changes to the company file. We are not trying to use Quickbooks web connector.

IIS; print on shared printer with IUSR-user

I’m trying to print to a shared printer from a IIS Windows 10 server with the IUSR user. So far unsuccessful.
The print job works with every other user, so it must be the authorization. Local printers are no problem.
On the IIS-server PHP starts a little C# application for server side printing an image. The printer is a shared printer on another Windows 10 pc in the (privat) network. There is no domain controller or something like that.
I have tried so far:
Add network service permissions to the IUSR-user:
https://serverfault.com/questions/469944/how-to-add-network-service-to-users-permission-group/469961
Set up the shared printer to a local port:
https://superuser.com/questions/899808/add-network-printer-as-a-local-printer
Switch to other users with other permissions in the c#-print-applikation:
C# How to change user context in app running on system
None of it works. Does anyone have a good idea or workaround?

How to print report on client side printer using ASPxDocumentViewer?

We are working on 14.1.7 version of Devexpress. We have an application running on a server. This server is not in our local network.
Our project is preparing reports to print after some operation on each cleints in different network area.Think one our customer (client) in USA,
another is in Russia. But they want to use their loacal printer to print report. And we succesfully print report in development enviroment in visiual st 2010 until publish on remote server.
Additionly we add data to report as dynimically. And we get error "No printers are installed".
Thanks for helps....

Send information to COM port from MVC.NET app

Is there any way to send information from my C# MVC.NET application (that is on a server computer inside a local network) to another PC (in the same network) which has a (fiscal) printer connected in a Serial Port?
My webapp is working ok, and I have a winform app that works ok too. But I cannot connect them.
So I think in sen all the information directly from the web app to the specific IP and COM port.
Is that possible in c#?
Physical hardware are not accessible from web application. You have to create windows services for printing. For the printer it doesn't matter that printer is installed on which port it can be on USB or COM port. If you want to print webpage then simply press Ctrl + P then you get print dialog or you can page.print() javascript method.

Data forwarding server

I have the app for Android and another app for PC, both were written by me. Android app connects to the PC app, and the PC app sends data (in realtime) to the smartphone.
The problem is: if the PC is connected to the mobile wireless network, I can't get its address, so I can't connect my Android app to the PC.
So, is there some simple application (for Windows), that I can use as a server for data forwarding. PC and mobile App will be connected to this server (launched on the station with the static address), and the server will just forward data from one app to another?
Or maybe there are good tutorials for creating such kind of server on C#/Java?
I would use a third pc (a server) that acts as a bridge for Android and PC. I wrote a web service in .NET for a virtual server on the internet. Both Android and PC know the ip address (or the domain name) of the server.
The PC talk to server using .NET native web service call, the Android uses ksoap.
For more infomration about ksoap for android look here:
http://code.google.com/p/ksoap2-android/
EDIT:
I suppose you can have the web server in the pc but you need to configure your modem to forward specific ports to the pc. But if you have no static ip address you need to reconfigure the ip address on Android device everytime your modem is rebooted (or switched off/on). You can also try to use dynamic dns services...
Check this out:
http://whiletrue.blog.com/2013/07/11/smartphone-as-pc-controller/
I've made this with Muzzley. Basically, you already have most of the work done if you integrate with it.
(disclaimer: i work for this project)
On the PC side, you can use the lib to include in you pc app in several languages:
(java) http://www.muzzley.com/documentation/libraries/java.html
(.NET) http://www.muzzley.com/documentation/libraries/dotnet.html
(nodejs) http://www.muzzley.com/documentation/libraries/nodejs.html
On the smartphone side, you can use any of the existent widgets (virtual interfaces):
http://www.muzzley.com/documentation/widgets.html
or eventually make your own:
http://www.muzzley.com/documentation/widgets/webview.html
Example:
You can pull from github several examples here:
https://github.com/muzzley/muzzley-demos/
(check the the webview example)
I hope it helps.

Categories