Exception on remote call

Exception on remote call

Post by Gregory Nickono » Tue, 04 Sep 2001 21:38:49



Hello again,

Another problem - I have remote object (implementing interface shared with
client) with 7 or more methods. All methods can be called without any
problems except one, which throws TargetInvocationException with the
following stack trace:

ServerStackTrace:
   at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object
target, SerializationInfo info, StreamingContext context)
   at
System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Objec
t obj, SerializationInfo info, StreamingContext context)
   at
System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder
holder)
   at System.Runtime.Serialization.ObjectManager.DoFixups()
   at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(Header
Handler handler, ISerParser serParser)
   at
System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Strea
m serializationStream, HeaderHandler handler)
   at System.Runtime.Remoting.Channels.CoreChannel.DeserializeMessage(String
mimeType, Stream xstm, Boolean methodRequest, IMessage msg, Header[] h)
   at
System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage(ISer
verChannelSinkStack sinkStack, ITransportHeaders requestHeaders, Stream
requestStream, IMessage& msg, ITransportHeaders& responseHeaders, Stream&
responseStream)

What's the problem? Maybe someone have a solution?

Regards,
Gregory.

 
 
 

Exception on remote call

Post by Graham Allwoo » Thu, 11 Oct 2001 21:40:24


Hi Gregory. Again I had this problem with Beta2. It occured when my remoted
method had a ref or out parameter that was a structure. You may find that if
you switch to TCP as a channel it will work OK.

This seems to be fixed in later builds.

Regards

Graham Allwood


Quote:> Hello again,

> Another problem - I have remote object (implementing interface shared with
> client) with 7 or more methods. All methods can be called without any
> problems except one, which throws TargetInvocationException with the
> following stack trace:

> ServerStackTrace:
>    at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object
> target, SerializationInfo info, StreamingContext context)
>    at

System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Objec
Quote:> t obj, SerializationInfo info, StreamingContext context)
>    at
> System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder
> holder)
>    at System.Runtime.Serialization.ObjectManager.DoFixups()
>    at

System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(Header
Quote:> Handler handler, ISerParser serParser)
>    at

System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Strea
Quote:> m serializationStream, HeaderHandler handler)
>    at

System.Runtime.Remoting.Channels.CoreChannel.DeserializeMessage(String
Quote:> mimeType, Stream xstm, Boolean methodRequest, IMessage msg, Header[] h)
>    at

System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage(ISer
Quote:> verChannelSinkStack sinkStack, ITransportHeaders requestHeaders, Stream
> requestStream, IMessage& msg, ITransportHeaders& responseHeaders, Stream&
> responseStream)

> What's the problem? Maybe someone have a solution?

> Regards,
> Gregory.


 
 
 

1. Exceptions in asynchronous remote call

Hello all,

I'm having such a basic problem with asynchronous
remoting that I'm sure I'm just missing something
obvious.

My client application makes an asynchronous call to
a remoted object using the BeginInvoke/EndInvoke
delegate methods. Now if there is an exception on
the server side, the client gets to handle that when
it calls EndInvoke. E.g., if the server makes a call
to an SQL database which fails with an SqlException,
the client sees the SqlException just fine. No
problem.

However, if the remote call fails due to a transport
level problem, then the client gets no chance to
handle the exception. E.g., I'm hosting my remote
server in IIS using Digest authentication. If the
authentication fails, the remote call in the
client generates a WebException, but that exception
appears to be thrown in the thread pool thread that
is making the remote call. If I run the client under
the debugger, I get the system unhandled exception
dialog. If I run the client stand-alone, the exception
simply kills the thread making the remote call, and
the call never completes.

So, how can I handle transport level exceptions in
the client code while doing an asynchronous remote
call? This is such a basic issue that there must be
a simple way to do it.

Thanks,
Sami

2. Adaptec EasyCD 4.02e+DirectCD3.01e+Nero 5.0.1.3+Win2k=???

3. Exception on remote call - serialization (serialization failure)

4. Remote Boot

5. Remote object method call to return another remote object

6. better newsgroups usage (was: STING and PPP: the final answer ?)

7. Calling method on remote obj with remote obj parm

8. JOB OPENING: PRE-SALES SYSTEMS ENGINEER

9. CreateInstance & DCOM remote object causes exception

10. UIPermission exception with remote assembly

11. Security Exception for a remote client IE control

12. GDI+ Exception in COM Add-In WinForm with Remote Desktop

13. Security Exception registering for remote events