Deleting Generated DOCX Files

Sep 25, 2012 at 6:51 PM

Any suggestions on best practices on removing files from the web server after DOCX files are generated?

Nov 8, 2012 at 11:16 AM

Through your .NET code would be best. You'll already have the exact filename/location when you created the document so you can use the same path that you used to save it. I would suggest using the server.MapPath instead of the hard coded C:\asdfsafd\ as this is more secure. There are 100's of examples in google if you search for ".NET delete file from server"

 

http://www.beansoftware.com/ASP.NET-FAQ/Delete-File-ASP.NET.aspx