Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create a random and unique string
Message
 
 
À
01/12/2015 09:32:31
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01628141
Message ID:
01628151
Vues:
45
Actually what you are saying occurred to me too. To create a simple xml file on the server with a bunch of unique IDs (as simple as '001', '002', and so on). and then when the application runs first time to grab one of those and store in the local storage. And then "mark" this ID as "used" in the xml file. But even simple approach has to be thought through carefully, before I start coding.
Thank you.

>What is the need for randomness? Not clear from the post. Why not ask the server for a unique ID if GUID is considered too flakey?
>
>
>>Hi,
>>
>>I want to store an ID of a tablet (e.g. iPad, Android, etc.) into a local storage of the browser. Then at run-time, my app will get this ID string and use it to get/set certain data on the web server that will "belong" to this or that device. I found some threads on Stackoverflow with sophisticated methods of generating a random string. Since I am dealing with 10 (or 20 at most) devices, I believe, this level of complexity is too much. Can you suggest a simple method of creating/getting a string of about 10 alphanumeric characters, from .net application? For example, "ABC123", "CBGHHD", and so on.
>>
>>TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform