passing a MemStream to a web service!!!

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
 
P

Patrick Steele [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top