Results 1 to 2 of 2

Thread: Help with deleting temp files

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Belgium
    Posts
    99

    Question Help with deleting temp files

    Hello everybody,


    I'm testing a program in asp.net which creates reports on the fly. EVerything's fine. When a user clicks a button, a window pops up and shows a pdf file from the crystal report. This is very easy, so they can print easily the report, close the window and browse further. Cause I found out that most people closed the browser window when they tried to close the pdf.

    Right now, I want to make a clean up to remove those temporary pdf files on my intranet server.

    I am just wondering how I could do this cause my pdf filename is based on my sessionId and when I do a delete from that file based on the sessionId, it doesn't get removed

    Has anyone other ideas how I could clean temporary files without interrupting other users ?

    I also can't delete them in one one step cause when I do this, I get a file not found error.

    If someone knows some solutions and if you want an example of my code, please do a page.postback

    Thanks in advance !

    Bjorn

  2. #2
    Addicted Member Dmyze's Avatar
    Join Date
    Mar 2002
    Location
    Seattle
    Posts
    160
    Could you put a delete routine in the Session_End Sub in the Global.asax ?
    -Daryl
    "Two More Rolls of Duct tape, and the world is mine!"
    VB.NET Guru

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