Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need sample code to find os name and os version for client or server ?

IP to OS
Posted
Updated 22-Aug-11 15:29pm
v2

I assume you're talking about ASP.Net, even though you failed to add the tag to your question.

For the client, parse the string you get back from this property:

Request.UserAgent


For the server itself, try this Codeproject article (it ain't hard to do, but the article explains some stuff):

Easily Get and Compare OS Version Information[^]

lastly, learn to use Google. This question is EASILY answered with a simple google search.
 
Share this answer
 
There is no single protocol or code for identifying devices on a network. Not all devices with an IP have a client or server operating system as you would think. You will also not see past firewalls configured to prevent external access.

You can try A Network Sniffer in C#[^] to see what's out there (by traffic type/source) and then use known protocols (WMI, bonjour perhaps?) to try to identify computers if they respond.

Cheers.
 
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