Click here to Skip to main content
14,734,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Team,

I am new to .Net. I have a requirement, where I need to get Client Machine details such as OS, Version, Hardware, IE browser version, and all the certificate details and send that information to Server. The main aim is to help client to install right Certificates.

Please suggest me. how to fetch the above information. I have heard using Remoting & Activex we can do it easily in .Net

Updated 21-Jan-13 6:18am
Sergey Alexandrovich Kryukov 21-Jan-13 11:15am
ActiveX is evil. And not all browser will support it. Why abusing the customer and risk it? This is a very unsafe practice.
nag24_m 21-Jan-13 11:17am
What would be the best option to get the details?
Actually my activex control used only Windows based operating system and it uses only IE browsers
Sergey Alexandrovich Kryukov 21-Jan-13 15:19pm
I don't know you goals. I would not break the basic principle of isolation of the client host from Web. This is safety, a very important thing. This talk could lead too far, I might disagree with whole business model. Can you explain a single reason, why a Web application may need to access the client computers? To service them? I would not deal with such service...
nag24_m 23-Jan-13 5:02am
My agend is to identify the old drivers & expired Certificates from client machine and upgrade it with correct drivers & right version of certificates. to achieve this, I need to know the machine configuration, I have diffrent set drivers and Certifcates for Windows Xp, Windows 2003, Windows 7.

Please suggest me is there any alternative way (other than Activex) to find the machine configuration details and suggest customer to update the right drivers and certificates.
Sergey Alexandrovich Kryukov 23-Jan-13 12:19pm
No, there is no alternative to ActiveX, and ActiveX is not a legitimate option.
Your only option is only on: stop doing it via the Web. This is not a Web task. There are admin scripts, etc. They can be used remotely...

If your whole business rely on a service like that via the Web, the whole business is at risk, put it this way.

nag24_m 29-Jan-13 1:06am
Thanks for the details. Could you suggest any admin scripts which I can try using C# or Java Scripts
I suggest you use PowerShell. There is a lot of advice on the Web, including remote administration.
PowerShell provides has very direct an easy, scripting-style access to WMI.
Additionally, as you probably know ASP.NET, all of your .NET knowledge can also be used, as PowerShell is the script language based on .NET and having access to all libraries you used to.
nag24_m 30-Jan-13 3:51am
Is it possible to run the powershell script from button click event at the client browser to capture necessary details?
Please provide any sample example
Sergey Alexandrovich Kryukov 30-Jan-13 12:04pm
You see, you need permission to access remote machine. Other then that — PowerShell provides API:

Request.Browser Property will help you.
Link: Request Details
Not really a good way to handle this - anyway Matthew Hudson has created a VB script that allows you to handle this using WMI:[^]

The above script will allow you to get information about certificate expiration using WMI.

For more information about WMI, you could have a look at:
Howto: (Almost) Everything in WMI via C# - Part 1: Registry[^]
How To: (Almost) Everything In WMI via C# Part 2: Processes[^]
How To: (Almost) Everything In WMI via C# - Part 3: Hardware[^]
WMI: MOF Basics[^]
Common Information Model[^]
Creating WMI Permanent Event Subscriptions Using MOF[^]

WMI can be used to interrogate other computers in your network, and here is some info on detecting the IE version: How Can I Determine Which Version of Internet Explorer is Installed on a Computer?[^]

Best regards
Espen Harlinn

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