Ken Kolda
10/7/2004 8:41:00 PM
Well, just because you can connect to a remote web server via HTTP doesn't
mean there isn't a firewall blocking some outbound connections. Firewalls
are certainly able to filter based on the target port number and/or the
actual packet contents. It also could be that requests on port 80 go through
a special proxy server they have which allows them to work.
In the end, here's the thing to know: if you can't establish a telnet
connection to your server on the port it's listening on, then remoting isn't
going to work. One thing you could try is to host your remote objects under
IIS. If, indeed, the remote client can access web sites, then it may be able
to use your remote object over HTTP/port 80.
I'm not sure what you mean by "I wonder if there is anyway to utilise
remoting to use this outgoing connection to contact my server with some
info". As far as I know you can't establish an outgoing connection to your
server. Until that problem is resolved, remoting won't work.
If you want to perform one more test, you could do this:
1) On your remote object server, create a simple console App that uses the
TcpListener to listen on whatever port you usually host your remote objects
on. For example:
TcpListener listener = new TcpListener(IPAddress.Any, 2000);
listener.Start();
while (true)
{
TcpClient client = listener.AcceptTcpClient();
Console.Writeline("Accepted connection from: " + ((IPEndPoint)
client.Client.RemoteEndPoint).Address);
client.Close();
}
2) On your client machine, use the TcpClient object to try to connect to it.
TcpClient client = new TcpClient();
client.Connect("123.222.80.26", 2000);
This is essentially what remoting is doing at its lowest levels (when you
use the TcpChannel), so if you can't get a connection to your server in this
way, remoting won't work.
Ken
"Eddie Stone" <nospam@spammy.org> wrote in message
news:Xns957BD6E1F62FBnospamspammyorg@207.46.248.16...
> Hi Ken,
>
> I can see what you mean, your test did fail in the same way. However on
> my set-up the firewall on my machine which hosts the server is not
> blocking requests like this.
>
> I know this because my samples work with clients on other remote
> machines which I access from gotomypc and from another asp.net website.
>
> Also the webserver where the client fails does not block outgoing
> requests because I wrote a little sample to download yahoo homepage
> using
>
> System.Net.WebClient();
>
> I know I'm clutching at straws but I wonder if there is anyway to
> utilise remoting to use this outgoing connection to contact my server
> with some info. If its not possible then I can start looking at a new
> host, smart clients and other kinds of workarouds.
>
> Your help is much appreciated.
>
>
>
> "Ken Kolda" <ken.kolda@elliemae-nospamplease.com> wrote in
> news:eTCybnJrEHA.2724@TK2MSFTNGP14.phx.gbl:
>
> > ChannelServices.RegisterChannel(new TcpChannel());
> >
> > try
> > {
> > object o = Activator.GetObject(typeof(IA),
> > "tcp://www.yahoo.com:1000/MyServer.rem");
> > Console.Write(o.ToString());
> > }
> > catch (Exception ex)
> > {
> > Console.WriteLine(ex.ToString());
> > }
> >
> > Console.ReadLine();
>