.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;
namespace remoteserver
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
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
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.