I try ADO 2 with binary like that:


======================
on server i send ms to client
======================
ds.RemotingFormat = SerializationFormat.Binary
Dim myFormatter As Runtime.Serialization.IFormatter = New _

Runtime.Serialization.Formatters.Binary.BinaryFormatter
ms = New MemoryStream
myFormatter.Serialize(ms, ds)


================
on client I got the ms
================
ms.Position = 0
ds.RemotingFormat = SerializationFormat.Binary
Dim myFormatter As Runtime.Serialization.IFormatter = New _

Runtime.Serialization.Formatters.Binary.BinaryFormatter
ds = myFormatter.Deserialize(ms)

the last line cause err:
"Permission denied: cannot call non-public or static methods
remotely."

Re: Deserialize DataSet cuase err:Permission denied by Cor

Cor
Mon Jun 02 22:30:18 CDT 2008

MTTC,

I remember me this one as a very old bug.

Maybe you can use this one,

http://www.vb-tips.com/SerializeDataSet.aspx

Cor

"mttc" <mtczx232@yahoo.com> schreef in bericht
news:4b4a2b99-b7ac-4a52-8198-a53f0a044634@m73g2000hsh.googlegroups.com...
>I try ADO 2 with binary like that:
>
>
> ======================
> on server i send ms to client
> ======================
> ds.RemotingFormat = SerializationFormat.Binary
> Dim myFormatter As Runtime.Serialization.IFormatter = New _
>
> Runtime.Serialization.Formatters.Binary.BinaryFormatter
> ms = New MemoryStream
> myFormatter.Serialize(ms, ds)
>
>
> ================
> on client I got the ms
> ================
> ms.Position = 0
> ds.RemotingFormat = SerializationFormat.Binary
> Dim myFormatter As Runtime.Serialization.IFormatter = New _
>
> Runtime.Serialization.Formatters.Binary.BinaryFormatter
> ds = myFormatter.Deserialize(ms)
>
> the last line cause err:
> "Permission denied: cannot call non-public or static methods
> remotely."


Re: Deserialize DataSet cuase err:Permission denied by mttc

mttc
Tue Jun 03 00:29:15 CDT 2008

writeXML is not Binary, and also not copy schema for column ith null
value. So we need some other solution please.

Re: Deserialize DataSet cuase err:Permission denied by mttc

mttc
Tue Jun 03 01:05:45 CDT 2008

Now I try on the client that recieve the to convert the memorystream
into byte() and then return it to memorystream. even I pass memeory
stream from remoting, it's work!

why microsoft west our time?