Exception handling in .NET remoting

  • Thread starter Thread starter Vinay
  • Start date Start date
V

Vinay

Hi,
Can anyone tell me how can I handle/catch exception
thrown by remoting object on client machine? Can some one
give me pointer? Actually I am connecting to two machines
and one of them throws exception, I want to identify that
particular machine on which remote object is throwing
exception.

Thanks,
Vinay
 
Vinay,

That is going to be something for you to decide. You can only link up
one type to a remote host (you can't get an instance of type A from App
Domain A, and another from App Domain B, they must both be remoted from the
same app domain). So, what you have to do is have some sort of mapping
between the type and the machine it is remoted from.

You can figure out the type from the exception, using the StackTrace
offered by the Exception, and this will give you a MethodInfo instance which
will point to the type of the object.

Hope this helps.
 
Back
Top