Tags: box, code, deployed, dynazip, files, itchokes, net, perfectlyon, production, server, sharp, unable, unzip

Dynazip - Unable to unzip. Please help!

On .Net » .Net C# (C sharp)

10,328 words with 4 Comments; publish: Wed, 02 Jan 2008 22:36:00 GMT; (10078.13, « »)

Hi,

We are using Dynazip to unzip files on our server. It works perfectly

on a test box but when the same code is deployed to the production, it

chokes. It creates the unzipped file with 0 bytes. It makes me think

that is some kinda environment/system issue but am not sure what it is.

I have checked the permissions on the folder/file and it seems to be

good.

Any help is really appreciated.

The code is as below.

<<snip

CDUnZipNET duzn = new CDUnZipNET();

// Set Dynazip settings

duzn.ZIPFile = OutputDir + ZipFileName;

duzn.Filespec = FileNameInsideOfZip;

//no. of bytes offset to start unzipping

duzn.StartingOffset=0;

duzn.StartingOffsetH=0;

duzn.MemoryBlockSize=1024 * 1024 * 6;

duzn.MemoryBlockSizeH=0;

fsOUT =new System.IO.FileStream(OutputDir + "FileOUT.xml",

System.IO.FileMode.OpenOrCreate,

System.IO.FileAccess.ReadWrite,

System.IO.FileShare.None);

if(fsOUT.CanWrite)

{

fsOUT.SetLength(0);

//Uses MemtoMem Event to stream data from ZIP file to memory

duzn.UnZipMemToMemCallback += new

CDUnZipNET.OnUnZipMemToMemCallback(this.UnZipMemTo MemCallback_event);

//Perform the UnZIP File To Memory Streaming function

duzn.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_FILETOMEM_STREAM;

}

else

{

//Problem with opening/creating the Output temp file so return

empty dataset

return data;

}

fsOUT.Close();

snip >

All Comments

Leave a comment...

  • 4 Comments
    • Have you tried contacting the vendor about this issue?

      --

      - Nicholas Paldino [.NET/C# MVP]

      - mvp.net-csharp.todaysummary.com.spam.guard.caspershouse.com

      "spdude" <sandeshmeda.net-csharp.todaysummary.com.gmail.com> wrote in message

      news:1151515397.639480.72230.net-csharp.todaysummary.com.d56g2000cwd.googlegro ups.com...

      > Hi,

      > We are using Dynazip to unzip files on our server. It works perfectly

      > on a test box but when the same code is deployed to the production, it

      > chokes. It creates the unzipped file with 0 bytes. It makes me think

      > that is some kinda environment/system issue but am not sure what it is.

      > I have checked the permissions on the folder/file and it seems to be

      > good.

      > Any help is really appreciated.

      > The code is as below.

      > <<snip

      > CDUnZipNET duzn = new CDUnZipNET();

      > // Set Dynazip settings

      > duzn.ZIPFile = OutputDir + ZipFileName;

      > duzn.Filespec = FileNameInsideOfZip;

      > //no. of bytes offset to start unzipping

      > duzn.StartingOffset = 0;

      > duzn.StartingOffsetH = 0;

      > duzn.MemoryBlockSize = 1024 * 1024 * 6;

      > duzn.MemoryBlockSizeH = 0;

      > fsOUT = new System.IO.FileStream(OutputDir + "FileOUT.xml",

      > System.IO.FileMode.OpenOrCreate,

      > System.IO.FileAccess.ReadWrite,

      > System.IO.FileShare.None);

      > if(fsOUT.CanWrite)

      > {

      > fsOUT.SetLength(0);

      > //Uses MemtoMem Event to stream data from ZIP file to memory

      > duzn.UnZipMemToMemCallback += new

      > CDUnZipNET.OnUnZipMemToMemCallback(this.UnZipMemTo MemCallback_event);

      > //Perform the UnZIP File To Memory Streaming function

      > duzn.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_FILETOMEM_STREAM;

      > }

      > else

      > {

      > //Problem with opening/creating the Output temp file so return

      > empty dataset

      > return data;

      > }

      > fsOUT.Close();

      >

      > snip >

      #1; Wed, 02 Jan 2008 22:38:00 GMT
    • Hi,

      Are you running this as what? web app, win service?

      r u getting any exception?

      --

      --

      Ignacio Machin,

      ignacio.machin AT dot.state.fl.us

      Florida Department Of Transportation

      "spdude" <sandeshmeda.net-csharp.todaysummary.com.gmail.com> wrote in message

      news:1151515397.639480.72230.net-csharp.todaysummary.com.d56g2000cwd.googlegro ups.com...

      > Hi,

      > We are using Dynazip to unzip files on our server. It works perfectly

      > on a test box but when the same code is deployed to the production, it

      > chokes. It creates the unzipped file with 0 bytes. It makes me think

      > that is some kinda environment/system issue but am not sure what it is.

      > I have checked the permissions on the folder/file and it seems to be

      > good.

      > Any help is really appreciated.

      > The code is as below.

      > <<snip

      > CDUnZipNET duzn = new CDUnZipNET();

      > // Set Dynazip settings

      > duzn.ZIPFile = OutputDir + ZipFileName;

      > duzn.Filespec = FileNameInsideOfZip;

      > //no. of bytes offset to start unzipping

      > duzn.StartingOffset = 0;

      > duzn.StartingOffsetH = 0;

      > duzn.MemoryBlockSize = 1024 * 1024 * 6;

      > duzn.MemoryBlockSizeH = 0;

      > fsOUT = new System.IO.FileStream(OutputDir + "FileOUT.xml",

      > System.IO.FileMode.OpenOrCreate,

      > System.IO.FileAccess.ReadWrite,

      > System.IO.FileShare.None);

      > if(fsOUT.CanWrite)

      > {

      > fsOUT.SetLength(0);

      > //Uses MemtoMem Event to stream data from ZIP file to memory

      > duzn.UnZipMemToMemCallback += new

      > CDUnZipNET.OnUnZipMemToMemCallback(this.UnZipMemTo MemCallback_event);

      > //Perform the UnZIP File To Memory Streaming function

      > duzn.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_FILETOMEM_STREAM;

      > }

      > else

      > {

      > //Problem with opening/creating the Output temp file so return

      > empty dataset

      > return data;

      > }

      > fsOUT.Close();

      >

      > snip >

      #2; Wed, 02 Jan 2008 22:39:00 GMT
    • Regardless that the permissions "seem to be ok" I'd strongly suspect that it

      still is a write permission issue.

      Peter

      --

      Co-founder, Eggheadcafe.com developer portal:

      http://www.eggheadcafe.com

      UnBlog:

      http://petesbloggerama.blogspot.com

      "spdude" wrote:

      > Hi,

      > We are using Dynazip to unzip files on our server. It works perfectly

      > on a test box but when the same code is deployed to the production, it

      > chokes. It creates the unzipped file with 0 bytes. It makes me think

      > that is some kinda environment/system issue but am not sure what it is.

      > I have checked the permissions on the folder/file and it seems to be

      > good.

      > Any help is really appreciated.

      > The code is as below.

      > <<snip

      > CDUnZipNET duzn = new CDUnZipNET();

      > // Set Dynazip settings

      > duzn.ZIPFile = OutputDir + ZipFileName;

      > duzn.Filespec = FileNameInsideOfZip;

      > //no. of bytes offset to start unzipping

      > duzn.StartingOffset=0;

      > duzn.StartingOffsetH=0;

      > duzn.MemoryBlockSize=1024 * 1024 * 6;

      > duzn.MemoryBlockSizeH=0;

      > fsOUT =new System.IO.FileStream(OutputDir + "FileOUT.xml",

      > System.IO.FileMode.OpenOrCreate,

      > System.IO.FileAccess.ReadWrite,

      > System.IO.FileShare.None);

      > if(fsOUT.CanWrite)

      > {

      > fsOUT.SetLength(0);

      > //Uses MemtoMem Event to stream data from ZIP file to memory

      > duzn.UnZipMemToMemCallback += new

      > CDUnZipNET.OnUnZipMemToMemCallback(this.UnZipMemTo MemCallback_event);

      > //Perform the UnZIP File To Memory Streaming function

      > duzn.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_FILETOMEM_STREAM;

      > }

      > else

      > {

      > //Problem with opening/creating the Output temp file so return

      > empty dataset

      > return data;

      > }

      > fsOUT.Close();

      >

      > snip >>

      >

      #3; Wed, 02 Jan 2008 22:40:00 GMT
    • Ok, I fixed this. For future reference - the duzn object has the

      ErrorCode property that gives you the nature of the error. In my case,

      I received the UE_UNKNOWN error because dzncore.dll (that ships with

      DynaZip Max) was in an incorrect location. Once I added it to

      C:\Windows\system32, it worked like a charm.

      Peter wrote:

      > Regardless that the permissions "seem to be ok" I'd strongly suspect that it

      > still is a write permission issue.

      > Peter

      > --

      > Co-founder, Eggheadcafe.com developer portal:

      > http://www.eggheadcafe.com

      > UnBlog:

      > http://petesbloggerama.blogspot.com

      >

      >

      > "spdude" wrote:

      > > Hi,

      > > We are using Dynazip to unzip files on our server. It works perfectly

      > > on a test box but when the same code is deployed to the production, it

      > > chokes. It creates the unzipped file with 0 bytes. It makes me think

      > > that is some kinda environment/system issue but am not sure what it is.

      > > I have checked the permissions on the folder/file and it seems to be

      > > good.

      > > Any help is really appreciated.

      > > The code is as below.

      > > <<snip

      > > CDUnZipNET duzn = new CDUnZipNET();

      > > // Set Dynazip settings

      > > duzn.ZIPFile = OutputDir + ZipFileName;

      > > duzn.Filespec = FileNameInsideOfZip;

      > > //no. of bytes offset to start unzipping

      > > duzn.StartingOffset=0;

      > > duzn.StartingOffsetH=0;

      > > duzn.MemoryBlockSize=1024 * 1024 * 6;

      > > duzn.MemoryBlockSizeH=0;

      > > fsOUT =new System.IO.FileStream(OutputDir + "FileOUT.xml",

      > > System.IO.FileMode.OpenOrCreate,

      > > System.IO.FileAccess.ReadWrite,

      > > System.IO.FileShare.None);

      > > if(fsOUT.CanWrite)

      > > {

      > > fsOUT.SetLength(0);

      > > //Uses MemtoMem Event to stream data from ZIP file to memory

      > > duzn.UnZipMemToMemCallback += new

      > > CDUnZipNET.OnUnZipMemToMemCallback(this.UnZipMemTo MemCallback_event);

      > > //Perform the UnZIP File To Memory Streaming function

      > > duzn.ActionDZ = CDUnZipNET.DUZACTION.UNZIP_FILETOMEM_STREAM;

      > > }

      > > else

      > > {

      > > //Problem with opening/creating the Output temp file so return

      > > empty dataset

      > > return data;

      > > }

      > > fsOUT.Close();

      > > snip >

      #4; Wed, 02 Jan 2008 22:41:00 GMT