[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Error on events subscriptions

emmanuel.castellani

8/19/2004 2:39:00 PM

Hi all,
I have a serious problem regarding the subscription to events to a
remote objects.

I have sometimes this error, and I really don't know why !

Does anybody can help me?

Thanks

Here is the error:
An unhandled exception of type
'System.Runtime.Serialization.SerializationException' occurred in
mscorlib.dll

Additional information: Serialization will not deserialize delegates
to non-public methods.

Here is the stack trace:
Unhandled Exception:
System.Runtime.Serialization.SerializationException: Serialization
will not deserialize delegates to non-public methods.

Server stack trace:
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.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String
objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel
securityLevel)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders,
Stream requestStream, IMessage& responseMsg, ITransportHeaders&
responseHeaders, Stream& responseStream)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at SmartHome.Bridges.ZWave.Service.Remote.RemoteAccess.add_nodeAdded(AddNodeHandler
value)
at SmartHome.Bridges.ZWave.ConfigurationTool.ZWaveConfigurationTool.initRemoteConnection()
in d:\visual studio projects\convergex\bridges\zensys\zwaveupnpbridgeconfigurationtool\zwaveconfigurationtool.cs:line
108
at SmartHome.Bridges.ZWave.ConfigurationTool.ZWaveConfigurationTool..ctor()
in d:\visual studio projects\convergex\bridges\zensys\zwaveupnpbridgeconfigurationtool\zwaveconfigurationtool.cs:line
80
at SmartHome.Bridges.ZWave.ConfigurationTool.ZWaveConfigurationTool.Main()
in d:\visual studio projects\convergex\bridges\zensys\zwaveupnpbridgeconfigurationtool\zwaveconfigurationtool.cs:line
972The program '[3900] ZWaveUPnPBridgeConfigurationTool.exe' has
exited with code 0 (0x0).


Emmanuel
2 Answers

Ken Kolda

8/19/2004 5:24:00 PM

0

Sounds like when you register your event handler that the callback method
you're using is a non-public method of the class (as it says in the error
message). When you register for a remote event you must use a public method
for the event handler.

Ken


"manu" <emmanuel.castellani@laposte.net> wrote in message
news:202f9f79.0408190639.3a6b1cf0@posting.google.com...
> Hi all,
> I have a serious problem regarding the subscription to events to a
> remote objects.
>
> I have sometimes this error, and I really don't know why !
>
> Does anybody can help me?
>
> Thanks
>
> Here is the error:
> An unhandled exception of type
> 'System.Runtime.Serialization.SerializationException' occurred in
> mscorlib.dll
>
> Additional information: Serialization will not deserialize delegates
> to non-public methods.
>
> Here is the stack trace:
> Unhandled Exception:
> System.Runtime.Serialization.SerializationException: Serialization
> will not deserialize delegates to non-public methods.
>
> Server stack trace:
> at System.DelegateSerializationHolder.GetDelegate(DelegateEntry de)
> at System.DelegateSerializationHolder.GetRealObject(StreamingContext
> context)
> at
System.Runtime.Serialization.ObjectManager.ResolveObjectReference(ObjectHold
er
> holder)
> at System.Runtime.Serialization.ObjectManager.DoFixups()
> at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(Head
erHandler
> handler, __BinaryParser serParser, Boolean fCheck, IMethodCallMessage
> methodCallMessage)
> at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream
> serializationStream, HeaderHandler handler, Boolean fCheck,
> IMethodCallMessage methodCallMessage)
> at
System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage
(String
> objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel
> securityLevel)
> at
System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IS
erverChannelSinkStack
> sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders,
> Stream requestStream, IMessage& responseMsg, ITransportHeaders&
> responseHeaders, Stream& responseStream)
>
> Exception rethrown at [0]:
> at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
> reqMsg, IMessage retMsg)
> at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
> msgData, Int32 type)
> at
SmartHome.Bridges.ZWave.Service.Remote.RemoteAccess.add_nodeAdded(AddNodeHan
dler
> value)
> at
SmartHome.Bridges.ZWave.ConfigurationTool.ZWaveConfigurationTool.initRemoteC
onnection()
> in d:\visual studio
projects\convergex\bridges\zensys\zwaveupnpbridgeconfigurationtool\zwaveconf
igurationtool.cs:line
> 108
> at
SmartHome.Bridges.ZWave.ConfigurationTool.ZWaveConfigurationTool..ctor()
> in d:\visual studio
projects\convergex\bridges\zensys\zwaveupnpbridgeconfigurationtool\zwaveconf
igurationtool.cs:line
> 80
> at
SmartHome.Bridges.ZWave.ConfigurationTool.ZWaveConfigurationTool.Main()
> in d:\visual studio
projects\convergex\bridges\zensys\zwaveupnpbridgeconfigurationtool\zwaveconf
igurationtool.cs:line
> 972The program '[3900] ZWaveUPnPBridgeConfigurationTool.exe' has
> exited with code 0 (0x0).
>
>
> Emmanuel


emmanuel.castellani

8/20/2004 7:31:00 AM

0

Thanks for your help, but I finally found the solution, it's just a
question of [Serializable] tag at the beginning of my client class...


Manu.