in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Error: Stream does not support writing

Last post 05-23-2007 4:53 PM by C1_BernardoC. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-22-2007 2:12 PM

    Error: Stream does not support writing

    Some of the users got this error while my application is using c1zip to create a zip file for backup purpose. Here is the stack trace info. Can someone please help? Thanks a lot!

    -Emily

    StackTrace Information

    *********************************************

    at System.IO.__Error.WriteNotSupported()

    at System.IO.FileStream.SetLength(Int64 value)

    at C1.C1Zip.e.b()

    at C1.C1Zip.e.d()

    at C1.C1Zip.C1ZipFile.r(Stream A_0, String A_1)

    at C1.C1Zip.C1ZipFile.a(String A_0, String A_1)

    at C1.C1Zip.C1ZipEntryCollection.Add(String fileName, String entryName)

    at C1.C1Zip.C1ZipEntryCollection.Add(String fileName)

  • 05-23-2007 9:48 AM In reply to

    Re: Error: Stream does not support writing

    It looks like your application opened a stream that is not writeable.
    Naturally, you can't create a zip file using such a stream...

    Can you post a sample or some source code?
  • 05-23-2007 10:39 AM In reply to

    Re: Error: Stream does not support writing

    Thanks Bernardo for your quick reply. This application worked fine for a long time until some of the users migrated to Active Directory. This error may be caused by the AD migration. I just want to see if you have any idea what could cause this error. Here is the source code, exception was returned when adding files to the Zip.

    ' Create zip file:

    Dim oZip As New C1ZipFile

    oZip.Create(BackupZipFileName)

    'Compress database files:

    For i As Integer = 0 To arrDataFiles.Count - 1

    oZip.Entries.Add(arrDataFiles(i).ToString())

    Next

  • 05-23-2007 3:51 PM In reply to

    Re: Error: Stream does not support writing

    It turns out that the error is caused by a file scan software that frequently scans the files on local drive, and made the file stream readonly

     

  • 05-23-2007 4:53 PM In reply to

    Re: Error: Stream does not support writing

    Glad to know the issue has been clarified. I hope the solution will be
    easy...

    <emilyluo> wrote in message news:195162@test.componentone.com...
    > It turns out that the error is caused by a file scan software that
    > frequently scans the files on local drive, and made the file stream
    > readonly
    >
Page 1 of 1 (5 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.