public string Method1() { try { _proxy.Method1(); } catch (Exception exp) // filter appropriately... { // if its a login error... if (Login()) { _proxy.Method1(); } else { throw; } } return(""); }