Very basic Remoting problem

Hi, I am new to this forum and seeking help from all you senirs.

Problem:

I've created a Remote object and inherited it from marshellbyref, I deployed to the other machine which is a 2003 server name it MachineA and created a website and hosted that remote object in the bin under the website directory and also placed the web.config file,for that remoted object,this object is returning me the machine name.

Now when I created a application on my machine just to test the remoting, I created the reference of the local remote object in my test application which is a web application and created a remote.config file along the web.config file and loaded that remote.config file in the page load event.RemotingConfiguration.configuration("remote.config").

But after executing the app, I am getting the local machine name, which is my machine, not the name of the remoted machine, where the remote object hosted.

Please help me out.

here Remoting is my namespace and MachineName is my class, which is returning the machine name.

for your convience, I am mentioning both the config files below

***************************************

config file, which is on my local machine

***************************************

<configuration>
<system.runtime.remoting>
<application name="remote">
<client>
<wellknown type="Remoting.MachineName, MachineName"
url="http://www.remotingtest.com/MachineName.soap"/>
</client>
<channels>
<channel ref="http" />
</channels>
</application>
</system.runtime.remoting>
</configuration>

***************************************

web.Config file which is on the remote server Machine A

***************************************

<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown mode="SingleCall" type="Remoting.MachineName, MachineName"
objectUri="MachineName.soap" />
</service>
</application>
</system.runtime.remoting>
<system.web>
<customErrors
mode="Off"
/>
</system.web>
<appSettings>
<add key="AppPath" value="C:\\RemotingTest\\" />
</appSettings>
</configuration>

***************************************



Answer this question

Very basic Remoting problem

  • Chuck H

    below, I pasted the Page_Load event of my testing applicat on how i am creating the remote object.

    private void Page_Load(object sender, System.EventArgs e)

    {

    // Put user code to initialize the page here

    RemotingConfiguration.Configure("c:\\Inetpub\\wwwroot\\TestSolution\\remote.config");

    //RemotingConfiguration.ApplicationName="Remote";

    Remoting.MachineName machineName = new Remoting.MachineName();

    //the below line should print the remote machine name, but it is printing the local machine name.

    Response.Write("<BR> Machine name = " + machineName.MachineID());

    }


  • Pablo Rincon

    How did you create an instance of that remoting object


  • Very basic Remoting problem