DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 02 Aug 2007 04:38:10 -0700,    posted on: microsoft.public.dotnet.framework.remoting        back       

Thread Index
  1    Martijn B
          2    Martijn B


Serialization will not deserialize delegates to non-public methods [HOWTO FIND DELEGATE]   
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
Date:Thu, 02 Aug 2007 04:38:10 -0700   Author:  

Re: Serialization will not deserialize delegates to non-public methods [HOWTO FIND DELEGATE]   
On 2 aug, 13:38, Martijn B  wrote:

> 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(ObjectHol­der
> holder)
> at System.Runtime.Serialization.ObjectManager.DoFixups()
> at
> System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(Hea­derHandler
> 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


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
Date:Mon, 06 Aug 2007 03:04:56 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us