Sunny
7/19/2004 3:02:00 PM
Hi,
your machineName shoud be your external IP address, not the internal
one.
Also, the channel properties are case sensitive, so the right one is
"machineName".
Sunny
In article <uUTYCnUbEHA.3016@tk2msftngp13.phx.gbl>,
adam.snider@comcast.net says...
> Okay, I'm trying to get a simple remoting example application working. I
> have two computers hooked up to a router/firewall and I'm testing out
> remoting between the two. The server code looks like the following:
>
> Imports System.Runtime.Remoting
> Imports System.Runtime.Remoting.Channels
> Imports System.Runtime.Remoting.Channels.tcp
> Imports ExchangeObjects
> Module Module1
> Sub main()
> Console.WriteLine("exhange host started")
>
> Dim props As IDictionary = New Hashtable(3)
> props("name") = "RouterName"
> props("port") = 10000
> props("machinename") = "192.168.1.103"
>
> Dim channel As New TcpChannel(props, Nothing, Nothing)
> ChannelServices.RegisterChannel(channel)
>
> Dim exchange As New Exchange
> RemotingServices.Marshal(exchange, "Exchange")
>
> Console.ReadLine()
>
> End Sub
> End Module
>
>
>
> The client code looks like the following:
>
> Imports System.Runtime.Remoting
> Imports ExchangeObjects
> Module Module1
> Sub main()
> Dim url As String = "tcp://192.168.1.1:10000/Exchange"
> Dim exchange As Exchange =
> CType(RemotingServices.Connect(GetType(Exchange), url), Exchange)
> Dim index As Integer = exchange.NextOrder
> Console.WriteLine("client: nextorder returned: " & index)
> End Sub
> End Module
>
> Now, I've enabled forwarding on my router to the ip address of the server
> side code using port 10000. Any ideas as to what I'm doing wrong???? I
> don't have a static IP address from my cable modem company, does that
> matter??? Any help would be greatly appreciated!!!!
>
> Thanks,
> Adam Snider
>
>
>