In asp.net how to delete a pdf file you just created for a user to view
Posted on 2008-02-04
I have a asp.net page that generates a pdf file on the fly for a user and then immediately opens it for them in their adobe reader. the problem is, I'm unable to delete it while they have the pdf open , because i get an access denied. so now i basically have tons of pdf files in this directory that they are stored in, and wonder if there is any easy way to delete these pdf files upon a user viewing it.
and no, i do not want to run a separate windows service or anything else that would clean the temp directory.