Click here to Skip to main content
13,189,506 members (27,622 online)
Rate this:
Please Sign up or sign in to vote.
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

Posted 21-Jan-13 5:09am
Updated 21-Jan-13 5: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:
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Request.Browser Property will help you.
Link: Request Details
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171016.2 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100