passing a MemStream to a web service!!!

  • Thread starter Thread starter boxim
  • Start date Start date
B

boxim

Is causing me some problems,

Created a web reference, the IDE has created a References.cs for the proxy
class
however, one of my methods takes a MemStream parameter - however instead of
being of type System.IO.MemStream, it's MyWebService.MemStream which then of
course is not accepted by other System.IO methods. I've tried casting, but
that doesn't work! I'm assuming this is possible else the it wouldn't have
created the proxy types.

Any ideas?

TIA

Sam Martin
 
Created a web reference, the IDE has created a References.cs for the proxy
class
however, one of my methods takes a MemStream parameter - however instead of
being of type System.IO.MemStream, it's MyWebService.MemStream which then of
course is not accepted by other System.IO methods. I've tried casting, but
that doesn't work! I'm assuming this is possible else the it wouldn't have
created the proxy types.

Why not just convert the memory stream to a base64 string and send that
to the web-service?

Besides, a MemoryStream is a .NET object. If you're going .NET to .NET,
you should consider remoting (better performance). If you're going .NET
to some unknown client or server via a webservice, you should not use
..NET objects in your web method calls.
 
Back
Top