Results 1 to 9 of 9

Thread: File clean up

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    outerspace
    Posts
    126

    File clean up

    Ive created a component which allows me to take a dataset and make it into a comma seperated value file. After the file is created the user is given the link to download it and they can however after they do this and exit out of the web app im still left with the file and after many users do this i have a ton of files sitting on the server that I no longer need and ideas on the best way to take care of this problem?
    "All those who wonder are not lost" -j.r.r tolkien

  2. #2
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    How about allowing say 5 files to be created and before creating a new file check to see if there 5 files. If there are overwrite the oldest one and rename it.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    outerspace
    Posts
    126
    thats an idea currently i am using there session id to give the file a name didnt think about doing it that way Ill give it a try I was trying to think of a way in which somehow after the file was downloaded to delete it. The application i have is running on an intranet and it is possible that with in the time a file is created 5 other users could also have created a file and effectivly deleted the users file before the have been given a chance to download it I fear. Though you have given me some ideas here so I will try to work with that thanks for the suggestion.
    "All those who wonder are not lost" -j.r.r tolkien

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    going further..use the session id as a file name, then in the session onend in the global.asax, just can delete files with the filename thta contains the session id of the timing out session.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    outerspace
    Posts
    126
    Does global.asax work like webconfig where it inherits the the parent one if it doesnt exist or does it have to exist for the applicaiton to work
    "All those who wonder are not lost" -j.r.r tolkien

  6. #6
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    I dont believe it is like web.config. Each application would have its own global.asax in its root directory
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    outerspace
    Posts
    126
    Well i guess modifying the six or so apps that I have with that isnt the end of the world. So would the all run at the same time when the session ends? If the user went to app a and created a file then went to app b and created a file then went to app c and created a file then the session times all three apps will execute there events?
    "All those who wonder are not lost" -j.r.r tolkien

  8. #8
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    It really depends on what you mean by application. When I say application, I am referring to what the virtual directory points to. If all those apps are running in that same virtual directory, then 1 global.asax is all that is needed.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    outerspace
    Posts
    126
    Well I do have some ideas formed Im not sure which way im going to go at this moment. It should defintly be intresting how it turns out.
    "All those who wonder are not lost" -j.r.r tolkien

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width