SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Webservice Zip and MemoryStream

Last post 09-02-2008 9:30 PM by Francis. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-02-2008 8:39 PM

    Webservice Zip and MemoryStream

    We have a webservice that send sql tables over the net inside dataset, we had issues with size so i tried this DLL and it actually work very well (7-8 meg to 100kb) but now that i finished my test locally in a basic application i'm incorporating it to the webservice.

    the function take a the dataset, compress and serialize. Then it put it into a MemoryStream Object and send it to the client applicationthen the client application pass it into a unzip function that take a stream as parameter.When i use the 2 function side by side it work but remotely i get Convert issue. I tried cast / change parameter and still give me similar error

    cannot convert from 'ProjectName.WebService.MemoryStream' to 'System.IO.Stream' 

     

    if i change my function to take memory stream this line has issue

    ZipInputStream zInStream = new ZipInputStream(sObjectStream);

     even

    ZipInputStream zInStream = new ZipInputStream((Stream)sObjectStream);

    second one give me this error

    Argument '1': cannot convert from 'ProjectName.WebService.MemoryStream' to 'System.IO.MemoryStream'

    look like Webservice memory stream is not the same as application memory stream. It's weird because i force them to use same namespace function which is system.io.memorystream

     

    any idea what i must do to make it also work with webservice ?

  • 09-02-2008 8:57 PM In reply to

    Re: Webservice Zip and MemoryStream

     Try using a byte array instead of a MemoryStream in your web service.

    Daniel Grunwald
  • 09-02-2008 9:30 PM In reply to

    Re: Webservice Zip and MemoryStream

    It's working fine with this. The size isn't much different than the stream but very close.

    8.6mb to 105kb with stream now 8.6mb to 144kbwith byte wont cry for 40kb :)

     

    thanks for the suggestion.

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.