Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I'm looking for assistance with writing C# network scanning program that will discover printers on a specific subnet. What I am not looking for is how to query network printers already installed on my PC or the print server.

My goal is to scan a specified IP address or subnet range, locate all or specific models of printers (all HP and Lanier/RICOH/Zebra), add these printers to a list box or perhaps a DataGrid since I need to add a combo box within the list rows. Within the list it would add the columns for the hostname followed by the IP address, mac address, serial number, model. If I can get this device info I can pretty much take care the rest of the application.

I wanted to do this using only the MS .NET framework without having to use anyone's custom SDK or library. Our IT security team will flag anything third party and will halt my development unless its 100% MS based.

I believe the way to do this is with WS-Discovery, UPnP, SSDP.

What I have tried:

I was looking for something similar to this from Zebra but using .NET and windows components only.

Zebra Network Discovery Class
Posted
Updated 9-Dec-21 0:17am

1 solution

I found this codeproject article. I don't know if it's going to help you, but...

Be aware that there are some issues with the code, but messages for the article describe fixes.

Implement a basic IP Scanner for a local LAN in C#[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900