Sunny
7/31/2004 8:42:00 PM
How and in what class is myObjectEventHandler method declared? Is it
public? Does the server has access to the assembly in which this class
is implemented?
Sunny
In article <ABA477F4-5F11-4307-8669-B30EFCCF2A0C@microsoft.com>,
notacat@bk.ru says...
> My Remoting service objects works fine when hosted in a plain Console Application.
> But when I run it in a Windows Service, it works only partially. Clients can make calls to its' methods, but can't subscribe onto its' events. When client tries to do something like this:
>
> MyObject.MyObjectEvent += new MyObjectEventHandler(myObjectEventHandler);
>
> occures the next Exception:
>
> ArgumentException: 'Error binging to target method'
>
> Server stack trace:
> at System.Delegate.InternalCreate(Object target, String method, Boolean ignoreCase)
> at System.Delegate.CreateDelegate(Type type, Object target, String method)
> 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.UnsafeDeserialize(Stream serializationStream, HeaderHandler handler)
> 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 DriverPack1.Geor.IGeor.add_StateChanged(StateChanged value)
> at IdObjectType_83ea868f_4cd9_4b7d_a237_5addaf58f3e9.RemoteProxy.OnInnerObjectIsNonNull(Object)
> at Uranus.Implementation.RemoteProxyBase.TryToGetLocalProxy() in c:\CurrentVersion\Uranus.Application\RemoteProxyBase.cs:line 65
> at Uranus.Implementation.RemoteProxyBase.Uranus.Implementation.ServerConnection+IClient.CollectionChanged() in c:\CurrentVersion\Uranus.Application\RemoteProxyBase.cs:line 106
> at Uranus.Implementation.ServerConnection.CollectionChanged() in c:\CurrentVersion\Uranus.Application\RemoteProxyBase.cs:line 379
> at Uranus.Implementation.ServerConnection.PingAndRestoreLoop() in c:\CurrentVersion\Uranus.Application\RemoteProxyBase.cs:line 321
> at Uranus.Implementation.ServerConnection.PingAndRestore() in c:\CurrentVersion\Uranus.Application\RemoteProxyBase.cs:line 292
>
> Thank you for any idea
>
>
>