problem: how to know when temporary static files are requested so that they can be deleted...

  • Thread starter Thread starter Frank Lopez
  • Start date Start date
F

Frank Lopez

In .NET and C#, is there anyway to create a hook for a specific
directory or file where my C# .NET software can monitor which static
web files are requested by the browser?

What I am doing is writing temporary files to a specific directory for
a specific user, and then when the user has requested each file in
that directory, I want to delete all of them.

It will also work if I can delete each temporary file after it is
requested. These files are only requested once, and after that I
would like them to be automatically deleted.

For example, a temporary file might be a GIF file such as
confidential.gif, and after that file is requested once I want it to
be immediately deleted from the temporary directory for that user's
id.

Any suggestions or possible workarounds?

Thanks,

Frank
 
Try the System.IO and System.IO.IsolatedStorage
namespaces. Other keywords to look for ar FileWatcher,
NotifyFilter, and FileSystemeventHandler...

--Richard
 
Back
Top