.net remoting - not listening

P

Piotrekk

Hi

I have a problem with my server which is not visible after netstat -na
command.

1. remote class library compiled to dll and registered to GAC

namespace RemoteClass
{
public class Mathematica : MarshalByRefObject
{
public int GetProduct(int a, int b)
{
return a * b;
}

public string GetHostLocation()
{
return AppDomain.CurrentDomain.FriendlyName;
}
}
}

2. server created and configured


namespace RemotingHost
{
class Program
{
static void Main(string[] args)
{

System.Runtime.Remoting.RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile,false);

Console.WriteLine("Press any key to shut down the
server");
Console.ReadLine();
}
}
}


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown mode="Singleton" type="RemoteClass.Mathematica,
RemoteClass" objectUri="RemoteClass"/>
<channels>
<channel ref="tvp" port="5000"/>
</channels>
</service>
</application>
</system.runtime.remoting>
</configuration>


Can you help me with this example? I don't have any ideas why server
is not listening. Firewall is switched off. i have also tried to set
objectUri to Mathematica
Kind regards
PK
 
W

Willy Denoyette [MVP]

Piotrekk said:
Hi

I have a problem with my server which is not visible after netstat -na
command.

1. remote class library compiled to dll and registered to GAC

namespace RemoteClass
{
public class Mathematica : MarshalByRefObject
{
public int GetProduct(int a, int b)
{
return a * b;
}

public string GetHostLocation()
{
return AppDomain.CurrentDomain.FriendlyName;
}
}
}

2. server created and configured


namespace RemotingHost
{
class Program
{
static void Main(string[] args)
{

System.Runtime.Remoting.RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile,false);

Console.WriteLine("Press any key to shut down the
server");
Console.ReadLine();
}
}
}


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown mode="Singleton" type="RemoteClass.Mathematica,
RemoteClass" objectUri="RemoteClass"/>
<channels>
<channel ref="tvp" port="5000"/>
</channels>
</service>
</application>
</system.runtime.remoting>
</configuration>


Can you help me with this example? I don't have any ideas why server
is not listening. Firewall is switched off. i have also tried to set
objectUri to Mathematica
Kind regards
PK


what channel is "tvp" supposed to relate to?
<channel ref="tvp" port="5000"/>

Willy.
 
P

Piotrekk

what channel is "tvp" supposed to relate to?
<channel ref="tvp" port="5000"/>

Willy.

Sorry - this is only mistake during copy paste - I have changed it to
tcp, however it is not working.
 
W

Willy Denoyette [MVP]

Piotrekk said:
Sorry - this is only mistake during copy paste - I have changed it to
tcp, however it is not working.


Another mistake during copy/paste?

<service>
<wellknown mode="Singleton" type="RemoteClass.Mathematica,
RemoteClass" objectUri="RemoteClass"/>
</service>
<channels>
<channel ref="tcp" port="5000"/>
</channels>


Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top