After downloading the file, I try to delete it from my PC, but it says that the file is being used.
What code am I missing to free a file for deletion?
You may need to close the InputStream manually after reading it to make sure that it is not kept open until the HttpPostedFileBase is garbage collected.