If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

.Net Remoting Problem. NOt working over LAN or Internet

This is the form.cs in my REMOTE SERVER

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using Microsoft.Win32;

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.Remoting;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Soap;
using System.Runtime.InteropServices;
namespace remoteclass
{

public class xx : MarshalByRefObject
{

public int sum(int a, int b)
{

return a + b;

}
}
}

when I input localhost in txtPath
it works great

But when I try to connect it over lan
(Say my ip address is 192.168.1.1 and the server's ip address is 192.168.1.2)
and i input 192.168.1.2 in txtPath

I get the System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not respond after a period of time, or established connection failed because connected host has failed to respond 192.168.1.2

and when i try it over the internet
I get the exception
"No connection could be made because the target machine actively refused it."

Re: .Net Remoting Problem. NOt working over LAN or Internet

When I take a look at the IP addresses, I assume that they are both in the same domain. My guess would be that the server's firewall is blocking the incoming request. Try disabling the firewall and see what happends.

Btw, please use code tags: [ code]your code here [ /code], but then with out the spaces