all groups > dotnet remoting > august 2007 >
You're in the

dotnet remoting

group:

Serialization will not deserialize delegates to non-public methods [HOWTO FIND DELEGATE]



Serialization will not deserialize delegates to non-public methods [HOWTO FIND DELEGATE] Martijn B
8/2/2007 4:38:10 AM
dotnet remoting: Hi there,

I've been put on a problem where i've got the fix the following issue:

System.Runtime.Serialization.SerializationException: Serialization
will not deserialize delegates to non-public methods.

at System.DelegateSerializationHolder.GetDelegate(DelegateEntry de)
at System.DelegateSerializationHolder.GetRealObject(StreamingContext
context)
at
System.Runtime.Serialization.ObjectManager.ResolveObjectReference(ObjectHolder
holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler
handler, __BinaryParser serParser, Boolean fCheck, IMethodCallMessage
methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream
serializationStream)

Problem is that i understand the problem but can't find where it
occurs. Is there a way to find the specific delegate where exception
message is talking about. The object graph consist of many many
objects, so it would be searching a needle in a haystack.


Thanks!

Martijn B
Re: Serialization will not deserialize delegates to non-public methods [HOWTO FIND DELEGATE] Martijn B
8/6/2007 3:04:56 AM
[quoted text, click to view]

I already found a solution to problem above.

I've created a method through reflection that lists all the events,
delegates and invocation list of the events of the given object and
his base classes and public properties (recursive). This way it goes
down the whole object graph. Through this list i could find the
specific delegate that was bound to a private method, which was the
problem.

Martijn B
AddThis Social Bookmark Button