Click here to Skip to main content
Rate this: bad
good
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
 
Thanks,
Nag
Posted 21-Jan-13 6:09am
nag24_m319
Edited 21-Jan-13 6:18am
v2
Comments
Sergey Alexandrovich Kryukov at 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.
—SA
nag24_m at 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 at 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...
—SA
nag24_m at 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 at 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.
 
—SA
nag24_m at 29-Jan-13 1:06am
   
Thanks for the details. Could you suggest any admin scripts which I can try using C# or Java Scripts
Sergey Alexandrovich Kryukov at 29-Jan-13 1:24am
   
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.
—SA
nag24_m at 30-Jan-13 3:51am
   
Hi
Is it possible to run the powershell script from Asp.net button click event at the client browser to capture necessary details?
Please provide any sample example
Sergey Alexandrovich Kryukov at 30-Jan-13 12:04pm
   
You see, you need permission to access remote machine. Other then that — PowerShell provides API:
http://msdn.microsoft.com/en-us/library/system.management.automation.powershell%28v=vs.85%29.aspx.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Request.Browser Property will help you.
Link: Request Details
  Permalink  
Rate this: bad
good
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:
 
http://www.sccm-tools.com/tools/vbscript/vbscript-certificates.html[^]
 
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
  Permalink  
v2

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

  Print Answers RSS
0 BillWoodruff 360
1 Mathew Soji 309
2 DamithSL 225
3 Afzaal Ahmad Zeeshan 202
4 Maciej Los 190
0 OriginalGriff 6,249
1 Sergey Alexandrovich Kryukov 5,853
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 3,865


Advertise | Privacy | Mobile
Web02 | 2.8.1411019.1 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2014
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