Temp Files

runswithsizzors

Well-known member
Joined
May 11, 2005
Messages
70
Location
Northern Michigan
Programming Experience
5-10
I have a situation where I have to upload an Access database, convert the information to the SQL Server. Then delete the Access database (that was uploaded to the server, not the local copy). My question is there a way I can use the ASP.net temp folder with a unique ID to save the Access database, because I don't want to stream the file all over the place? We need a unique folder because there could be multiple people upload Access database files and converting them at the same time.

If there is a way, how would I keep track of that unique folder name?

Any information or web links would be awesome thanks!
 
IO.Path.GetRandomFileName() method could be useful. Also the Session.SessionID can be useful to link a file to each session.
 
The session.SessionID is a good way to go, thank you for that. Is there any way to access the asp.net temp folder with out specifying the path (a namespace or function)? I don't want to use the system temp folder. I basically want to minimize the amount of security changes I have to make to system folders. Thanks for the info one again!
 
I think you mean HttpRuntime.CodegenDir, but I have the impression that folder is used for internal purposes of the ASP.Net application compilation. Why not use App_Data or subfolder, or just a subfolder of the application root?
 
Yeah I think I am going to use a subfolder in the application root. Thinking it over that folder will already need access from the web user so setting up extra security isn't really a big deal. Thanks for all the help!
 
Back
Top