0

We are looking for a way to know from what computer our silverligth or web application is running. We first wanted it to do by MAC adress but we found out that silverligth can't access the mac adress.

I was wondering is there a way go get a unique computer adress like a mac adress or something else pc unique? by silverligth/javascript/html or something else web based witout installing anything on their pc?

Thx Matthy

Ash Burlaczenko
  • 24,778
  • 15
  • 68
  • 99
matthy
  • 8,144
  • 10
  • 38
  • 47
  • 1
    Similar Q with a lot of answers/links that may help? http://stackoverflow.com/questions/216542/how-do-i-uniquely-identify-computers-visiting-my-web-site – Darren Wainwright Nov 15 '12 at 15:35
  • 1
    Set a cookie. Yes, the user can delete it, but that's [status-by-design]. – CodesInChaos Nov 15 '12 at 15:37
  • I don't know if this will work on Silverlight, but here http://stackoverflow.com/questions/9546228/how-to-detect-the-original-mac-address-after-it-has-been-spoofed/9546552#9546552 there is a method using WMI – Steve Nov 15 '12 at 15:41
  • Your solution is going to be to generate your own (and hopefully not just picking `last_user_number += 1;`, for security's sake), and preferably do so on the server side of things, or through a one-time callback to the server for a new ID, into a cookie/local-storage. Also of note, MAC addresses aren't 100% unique. It is stupid-unlikely that there are duplicate MAC addresses on one network... but that's the point - it needs to be unique to the network and not to the internet, as that's what IP Addresses (in conjunction with networks, in conjunction with MACs) are there to do. – Norguard Nov 15 '12 at 15:42
  • All you really need is a GUID – Andrew Rhyne Nov 15 '12 at 16:03

2 Answers2

5

This tutorial walks you through it:

http://code.msdn.microsoft.com/silverlight/ComputerID-fr-Silverlight-e07cbeb7

Andrew Rhyne
  • 5,060
  • 4
  • 28
  • 41
1

Generally it isn't possible to get a 100% unique identifier for each computer, however it is possible to get it somewhat unique. I have previously implemented some javascript/java code to do that. It worked by generating a hash from a few characteristics of client's machine:

  • Fonts installed on client's machine
  • Java version
  • Silverlight version
  • IP address

The combination created a somewhat unique identifier for each client, although it is very possible that several clients would have the same identifier. Or something like that... It was a long time ago.

(The whole thing depended heavily on having Java or Silverlight installed. Also user would need to allow the site to run the applet...)

I would suggest not going that way and simply accept the fact that it's not quite possible and find other solution to your problem.

niaher
  • 9,460
  • 7
  • 67
  • 86
  • He can use a GUID, as defined above. Don't assume – Andrew Rhyne Nov 15 '12 at 16:10
  • in a time of automated software upgrades I would not rely on version numbers of software packages. IP address would be good if it's not a VPN address or a 10.x.y.z. ... they are changing too often, too – MikeD Nov 20 '12 at 14:25