R
riz
Hi
I use Framework 2.0, .Net Remoting, Client with WinForms and a Server.
Everything works fine, but i can't catch Exceptions on the Client, which
have been thrown on the Server.
I would like to catch the ArgumentOutOfRangeException on the Client (if
there is no Person), but it stopps in FindPerson() on the Server.
ArgumentOutOfRangeException is Serializable by default. If i test
FindPerson(1) on the Server with a Test Class. I can catch the
Exception, as it should be. Does anybody know, what i am doing wrong?
Has it something to do with the Interface?
Client communicates with Server like this:
------------------------------------------
IServer server = (IServer)Activator.GetObject(type, url);
//get a Person
try{
server.FindPerson(1);
...
}
//I can't catch it here, but i would like to
catch (ArgumentOutOfRangeException ex) {
MessageBox.Show(ex.Message);
}
Server: IServer
---------------
public Person FindPerson(int id){
try{
return coll.GetPerson(id)[0];
}
catch(Exception e){
throw;
}
}
IServer
-------
public interface IServer {
Person FindPerson (int i);
}
thx
riz
I use Framework 2.0, .Net Remoting, Client with WinForms and a Server.
Everything works fine, but i can't catch Exceptions on the Client, which
have been thrown on the Server.
I would like to catch the ArgumentOutOfRangeException on the Client (if
there is no Person), but it stopps in FindPerson() on the Server.
ArgumentOutOfRangeException is Serializable by default. If i test
FindPerson(1) on the Server with a Test Class. I can catch the
Exception, as it should be. Does anybody know, what i am doing wrong?
Has it something to do with the Interface?
Client communicates with Server like this:
------------------------------------------
IServer server = (IServer)Activator.GetObject(type, url);
//get a Person
try{
server.FindPerson(1);
...
}
//I can't catch it here, but i would like to
catch (ArgumentOutOfRangeException ex) {
MessageBox.Show(ex.Message);
}
Server: IServer
---------------
public Person FindPerson(int id){
try{
return coll.GetPerson(id)[0];
}
catch(Exception e){
throw;
}
}
IServer
-------
public interface IServer {
Person FindPerson (int i);
}
thx
riz