Note that I'm not talking about the compiler-generated "Temporary ASP.NET Files".
My web application (ASP.NET MVC) uses Graphviz to generate images that are then fed to the client. This requires the creation of temporary files.
What's the best way to deal with these? Is there a way to delete them immediately after they're sent? Should I use a background thread? Something in Application_Start or Application_End?
couldn't you do it through a controller or use an ASHX (http://www.marklio.com/marklio/CommentView,guid,df8d6471-83fd-4f66-a799-ef8274979f0e.aspx) to stream out the content and delete the temp files once you had finished writing out the stream?
Graphviz creates the client, and adds them as a link in the page. so you cannot delete them directly.
there are several ways:
be aware, that you should not delete the images, that are created just a second ago. due to they can be used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With