Re: Error while invoking remoteobject method
- From: Goran Sliskovic <gsliskov@xxxxxxxxx>
- Date: Mon, 08 Jan 2007 00:51:46 +0100
source wrote:
I was not able to resolve to the domain InProc when I did nsLookup InProc....
I was wondering if it cannot find the Host, how come I do not get an error on this line
InProcessHost inProcIPH = (InProcessHost)Activator.GetObject(typeof(InProcessHost), "tcp://InProc:8086");
But I even tried this as I am running both server and clinet on the same machine
InProcessHost inProcIPH = (InProcessHost)Activator.GetObject(typeof(InProcessHost), "tcp://<myIPaddress>:8086");
If I do this with the IP Address, the object gets created, but then
if I try to invoke any method like
inProcIPH.Foo();
"Value cannot be null.
Parameter name: URI"
Connection is actually established at first method call, nat at the point you call Activator.GetObject ("lazy connect"). That's why it trows exception when you call inProcIPH.Foo(). Try following:
InProcessHost inProcIPH =
(InProcessHost)Activator.GetObject(typeof(InProcessHost),
"tcp://127.0.0.1:8086/InProc"); You are missing /InProc in your URI.
Regards,
Goran
.
- References:
- Re: Error while invoking remoteobject method
- From: Goran Sliskovic
- Re: Error while invoking remoteobject method
- Prev by Date: Re: Error while invoking remoteobject method
- Next by Date: Re: TCP Streams from Unknown source to VB.Net
- Previous by thread: Re: Error while invoking remoteobject method
- Next by thread: Re: TCP Streams from Unknown source to VB.Net
- Index(es):