Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code does not execute on Windows Service
Message
De
20/09/2010 01:19:53
 
 
À
19/09/2010 18:21:02
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01481890
Message ID:
01481940
Vues:
26
Looking at this from 15K meters... hopefully you're not trying to get drive or volume serial numbers for the purpose of copy protection.

I think in another branch/thread you said these machines where you're trying to get drive or volume serial numbers are running virtualized.

When virtualized, you don't get a physical hard drive (you get a VHD file instead), you get whatever the VM decides to give you. I don't know the specifics for VMWare but that value could well be the same for all VMWare VMs.

Even when you're running on dedicated hardware there will be problems getting drive serial numbers. For example, my dev machine has 2 drives in hardware RAID1. Which one will be returned by a drive serial number function? Since February, when I built this machine I've had both drives fail (at different times) so neither drive serial number is the same as at the start. I'd be annoyed if software stopped working because of this.

You might have better luck with a volume serial number, which I believe gets generated by Windows when the OS is installed. However, both this and the drive serial number can easily be duplicated if you simply copy the VM, and run it again on the same, or separate hardware.

You could look into network adapter MAC addresses or other similar hardware parameters but they all have that same problem when virtualized.

One thing that can help in some environments is just to use the machine's NetBIOS name. That must be unique on a locally routable LAN. It's something that's a PITA to change (especially for servers) and tends to stay the same regardless of hardware changes/upgrades/replacements.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform