[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

have remoting with events working on a single machine, but...

John Kotuby

9/23/2004 11:07:00 PM

have remoting with events working on a single machine, but... when I put the
server, client, and remote object on a 2nd machine.... things do not work
completely.. So basically I have the same 3 directories (Client, Server,
RemoteObject) on two machines. I run the server on machine1, the client on
machine2... Now client indeed has access to the remote object... and the
client does call a function on that remote object... as the console for the
server writes out a msg when it gets a request...

public void BroadCastMessage(string msg)
{
IAsyncResult ar;

Console.WriteLine("Raising EventHandler1");

System.Delegate[] invkList = EventHandler1.GetInvocationList();
IEnumerator ie = invkList.GetEnumerator();
while(ie.MoveNext())
{
RemotingObject.EventHandlerDelegate handler =
(RemotingObject.EventHandlerDelegate)ie.Current;
try
{
ar = handler.BeginInvoke(msg,null,null);
}

upon calling BeginInvoke, it sits for a second or three... but nothing on
the client occurs...

Now if I ran the client & server on the same machine, things work....

any clues please....
1 Answer

John Kotuby

9/24/2004 12:03:00 AM

0

never mind... found the solution from another append....

used prop["machineName"] = "myexternalip.com";
on the the server side....

"JohnK" wrote:

> have remoting with events working on a single machine, but... when I put the
> server, client, and remote object on a 2nd machine.... things do not work
> completely.. So basically I have the same 3 directories (Client, Server,
> RemoteObject) on two machines. I run the server on machine1, the client on
> machine2... Now client indeed has access to the remote object... and the
> client does call a function on that remote object... as the console for the
> server writes out a msg when it gets a request...
>
> public void BroadCastMessage(string msg)
> {
> IAsyncResult ar;
>
> Console.WriteLine("Raising EventHandler1");
>
> System.Delegate[] invkList = EventHandler1.GetInvocationList();
> IEnumerator ie = invkList.GetEnumerator();
> while(ie.MoveNext())
> {
> RemotingObject.EventHandlerDelegate handler =
> (RemotingObject.EventHandlerDelegate)ie.Current;
> try
> {
> ar = handler.BeginInvoke(msg,null,null);
> }
>
> upon calling BeginInvoke, it sits for a second or three... but nothing on
> the client occurs...
>
> Now if I ran the client & server on the same machine, things work....
>
> any clues please....