Subject: Extracting file to a memory buffer with Developer Express AspxFileManager  generates: System.IO.IOException: 'The process cannot access the file "" because it is being used by another process.'
Date: 2020-10-08 19:58:42
From: catchem35
Source: extracting-file-memory-buffer-developer-express-aspxfilemanager-generates-system-io-ioexception-the-process-cannot-access-file-used-another-process
----------------------------------------------------------------------

I downloaded the trail of UltimateZip and have been trying to follow and implement the example for: Extracting file to a memory buffer
https://doc.componentpro.com/ComponentPro-Zip/Extracting-file-to-a-memory-buffer

I am using this with the Developer Express AspxFileManger to unzip on the download using the following code:

Protected Sub ASPxFileManager1_FileDownloading(source As Object, e As DevExpress.Web.FileManagerFileDownloadingEventArgs) Handles ASPxFileManager1.FileDownloading
        Dim openfile As String = e.File.FullName.ToString

        ' Open an existing file. 
        Dim zip As New Zip()
        zip.Open(openfile)
        zip.ExtractFile("my file.zipt", e.OutputStream)
        ' Close the zip file.
        zip.Close()

    End Sub

Using zip.open() generates an error that the file being downloaded is in use. 

Developer Express has properties for e.OutPutStream and e.InputStream but I can’t seem to use the e.inputStream as the zip.Open argument. https://docs.devexpress.com/AspNet/DevExpress.Web.FileManagerFileDownloadingEventArgs.InputStream

Any suggestions would be appreciated. 
Thank you.

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index