ipgbarry
asked on
Generating uniquie ID's for files that are produced by my Web APP?
HI I am developing a web app in C# / ASP.net with a SQL2005 database. I need to generate uniquie file id's & file names for files that are created, but don't want people to be able to guess a new file ID as they may see others data. What would be the best way to implement this type of thing?
Cheers
Baz
Cheers
Baz
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thats a good solution too JDEE8297, but ipqbarry has this requirement
"don't want people to be able to guess a new file ID as they may see others data."
In such a case GUID can be useful.
"don't want people to be able to guess a new file ID as they may see others data."
In such a case GUID can be useful.
true, but in my case the only people who have access to the files is the internal art people, the customer themselves don't have access to these file and if we ever did give them access to it. They still wouldn't be able to access them, because the actual name of the file that I send back to the user when the link is clicked, is not the actual name of the file on the server. Still the solution with the guid was a good one. :)
What I did in my system was the date time and id in the record in my database, the file itself was stored on the server, but I create a link to it so that when someone clicked on the link it would download the file with a meaningful name.
example
yyyymmdd_hhmmss_recordid_f