Possible Duplicate:
.NET Remoting Exception not handled Client-Side
I have a client-server applicaytion working with .NET Remoting. Server contains a class (RemoteClass) which contains a method throwing exception. But this exception crushes server instead of being handled by client try/catch block. My code looks like:
//Common library
public class RemoteClass : MarshalByRefObject
{
public void SomeMethod ()
{
throw new NotSupportedException (); //Standart exception with Serializible attribute
}
}
//Client-side code
try
{ //remote is instance of remoteobject,the other its methods work fine
remote.SomeMethod ();
}
catch(exception e)
{
//I want to handle exception here
}
But as I mentioned above my server-side is crushed...( Is there a way to do what I want via .NET Remoting?