Readtimeout/writetimeout threw an exception of type Sys.InvalidOperationException in vb.net

40 Views Asked by At

I am reading data from one flat file and stored the values in to temp variable. When get read the write the first position value from the temp I am geting read/write timeout error.

Here is my code:

Dim ms As New System.IO.MemoryStream
gzip = New IO.Compression.GZipStream(ms, IO.Compression.CompressionMode.Compress, True)
gzip.Write(buffer, 0, buffer.Length)
gzip.Close()
ms.Position = 0
dim tempdata = ms.ToArray()

error screen print attached for more clarity.

Please help to resolve this issue.

enter image description here

I tried with the below property. but no luck ms.flush()

0

There are 0 best solutions below