Charlie
9/2/2004 1:45:00 AM
Hi again,
Really I need some help or direction on this point. I prepare a
proof-of-concept app to show you my issue. We're trying to move ours custom
services to use remoting architecture, but if i don't find a quick fixed for
this issue, maybe I'll be dead man tomorrow!!
*************************************
************ Server Class ***************
*************************************
public class RemotingService : MarshalByRefObject
{
public RemotingService(){}
public void Execute(ref int i)
{
i = 1;
throw new System.Exception("Remoting Exception...");
}
}
*************************************
************ Client Class ***************
*************************************
class Client
{
[STAThread]
static void Main(string[] args)
{
RemotingConfiguration.Configure("Client.exe.config");
RemotingService srv = new RemotingService();
int i = 0;
try { srv.Execute(ref i); }
catch (System.Exception ex) {Console.WriteLine(ex.Message);}
// will be print 0... why not print 1?...
//if the service run locally (Not Remoting) print 1...
Console.WriteLine(i.ToString());
}
}
Just for you information, I'm using a singlecall mode in the web.config file
in the server side.
Tks
--
Carlos Redondo
..Net Developer