We currently have a few products for which the licensing depends on the computer name, the customer enter the computer name to create a license key and uses that license key to license the product on that machine.
For Azure roles, the computer name of a server does not remain constant so the above said method of generating the license key does not work. I am looking into an alternate way of generating the license key for each Azure instance. Instead of using the computer name, is there any other environment variables for Azure instance that I might be able to use to generate the license key?
Perhaps I might be able to use RoleEnvironment.CurrentRoleInstance property. Will this property persist if the fabric controller re-images or recreates the instance? Any thoughts?
RoleEnvironment.CurrentRoleInstance is probably your best alternative, however, Windows Azure makes no promises or guarantees about spinning up machines named with a proper naming pattern and correct sequencing.
So, it may work this month or next, but in a year from now, when they change naming conventions or sequencing logic, you and your customers will need to do redeploy and in “hot” production environment – because changes in Azure are rolled out every month without big pre-announcements.
In general, this is a tough issue if you insist on marrying license to anything machine-specific in Azure. Can you find no other way to enforce the copyright?