Click here to Skip to main content
15,900,511 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is this result realistic? Pin
Dario Solera18-Sep-05 1:40
Dario Solera18-Sep-05 1:40 
QuestionBinding Ndisprot to MS Loopback Pin
rick.north17-Sep-05 23:35
rick.north17-Sep-05 23:35 
Questionhelp to create a dll Pin
Sasuko17-Sep-05 23:19
Sasuko17-Sep-05 23:19 
AnswerRe: help to create a dll Pin
Niklas Ulvinge18-Sep-05 0:55
Niklas Ulvinge18-Sep-05 0:55 
GeneralRe: help to create a dll Pin
Anonymous18-Sep-05 4:04
Anonymous18-Sep-05 4:04 
GeneralRe: help to create a dll Pin
Niklas Ulvinge18-Sep-05 5:12
Niklas Ulvinge18-Sep-05 5:12 
AnswerRe: help to create a dll Pin
Heinz_18-Sep-05 8:02
Heinz_18-Sep-05 8:02 
Questionremoting basics Pin
g00fyman17-Sep-05 21:04
g00fyman17-Sep-05 21:04 
hi to all,

i have sifted through the many remoting turoials and come up with this basic implementation to understand the workings .. but ... Smile | :)

i changed the RemoteData (public interface method) contents to reflect that it is on another computer, changed to "server says hello", while the local copy is "local copy".
the server RemoteData object is never called, why is this so? it always returns "local copy" when the client is started.

can someone explain this to me please?

sorry about the code tags, but needed for the xml D'Oh! | :doh:

-------- the server
<code>
using System;
using System.Runtime.Remoting;
using StationUpdate;

namespace SimpleServer
{
/// <summary>
/// The remoting server
/// </summary>
public class RemotingServer
{
public RemotingServer()
{
}

private static RemoteData rd=null;

static void Main(string [] args)
{
RemotingConfiguration.Configure("SimpleServer.exe.config");
rd = new RemoteData();
RemotingServices.Marshal(rd,"RemoteData");
Console.WriteLine("Press return to exit");
Console.ReadLine();
}
}
}
</code>

-------- the server config
<code>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="8000" />
</channels>
<service>
<wellknown mode="SingleCall" type="Remoting.StationUpdate.RemoteData,Remoting.StationUpdate" objectUri="RemoteData" />
</service>
</application>
</system.runtime.remoting>
</configuration>
</code>

-------- the client
<code>
using System;
using System.Runtime.Remoting;
using StationUpdate;

namespace SimpleClient
{
/// <summary>
/// Summary description for SimpleClient.
/// </summary>
public class SimpleClient
{
public SimpleClient() { }

static void Main(string[] args)
{
RemotingConfiguration.Configure("SimpleClient.exe.config");
RemoteData robj = new RemoteData();
Console.WriteLine(robj.Hello());
Console.ReadLine();
}
}
}
</code>

-------- client config -- pesca is anothe host on my LAN
<code>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name = "SimpleClient">
<client>
<wellknown type="Remoting.StationUpdate.RemoteData,Remoting.StationUpdate" url="tcp://pesca:8000/RemoteData"/>
</client>
<channels>
<channel ref="tcp" port="0"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>
</code>

-------- the remote object
<code>
using System;
using System.Runtime.Remoting.Lifetime;

namespace StationUpdate
{
/// <summary>
/// The remote object
/// </summary>
public class RemoteData : System.MarshalByRefObject
{
public RemoteData()
{
Console.WriteLine("RemoteData Constructor Called");
}
public override object InitializeLifetimeService()
{
return null;
}

public string Hello()
{
//return "server says hello";
return "local copy";
}
}
}
</code>


QuestionHoe To increase Row Height of a List View control! Pin
majidbhutta17-Sep-05 19:49
majidbhutta17-Sep-05 19:49 
AnswerRe: Hoe To increase Row Height of a List View control! Pin
mav.northwind17-Sep-05 23:00
mav.northwind17-Sep-05 23:00 
QuestionCrystal report Pin
Amir Jalaly17-Sep-05 19:46
Amir Jalaly17-Sep-05 19:46 
QuestionTyped DataSet Pin
Taurian11017-Sep-05 16:39
Taurian11017-Sep-05 16:39 
QuestionWindows DataGrid Pin
Taurian11017-Sep-05 16:32
Taurian11017-Sep-05 16:32 
QuestionDatabound ComboBox Selection Problems Pin
Glenn E. Lanier II17-Sep-05 13:46
Glenn E. Lanier II17-Sep-05 13:46 
QuestionAdding SMP Support Pin
Heinz_17-Sep-05 11:23
Heinz_17-Sep-05 11:23 
AnswerRe: Adding SMP Support Pin
Dave Kreskowiak17-Sep-05 14:37
mveDave Kreskowiak17-Sep-05 14:37 
GeneralRe: Adding SMP Support Pin
Heinz_18-Sep-05 8:09
Heinz_18-Sep-05 8:09 
GeneralRe: Adding SMP Support Pin
Dave Kreskowiak19-Sep-05 1:33
mveDave Kreskowiak19-Sep-05 1:33 
GeneralRe: Adding SMP Support Pin
Heinz_19-Sep-05 10:45
Heinz_19-Sep-05 10:45 
GeneralRe: Adding SMP Support Pin
Heinz_19-Sep-05 11:27
Heinz_19-Sep-05 11:27 
GeneralRe: Adding SMP Support Pin
Dave Kreskowiak19-Sep-05 15:24
mveDave Kreskowiak19-Sep-05 15:24 
GeneralRe: Adding SMP Support Pin
Heinz_19-Sep-05 17:10
Heinz_19-Sep-05 17:10 
QuestionMoving xml nodes Pin
thepersonof17-Sep-05 9:53
thepersonof17-Sep-05 9:53 
AnswerRe: Moving xml nodes Pin
Alomgir Miah17-Sep-05 11:02
Alomgir Miah17-Sep-05 11:02 
AnswerRe: Moving xml nodes Pin
Heinz_17-Sep-05 11:12
Heinz_17-Sep-05 11:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.