Deserialize DataSet cuase err:Permission denied

  • Thread starter Thread starter mttc
  • Start date Start date
M

mttc

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."
 
writeXML is not Binary, and also not copy schema for column ith null
value. So we need some other solution please.
 
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?
 
Back
Top