jfz2004
asked on
Need help in Microsoft's Remote Object application
Hi,
I am working on a sample application of Remote Object. It works
if I don't have parameters passed in calling the object, i.e., client
can talk to the server. But how to pass a parameter to server's
object? Below is part of the source code in the server:
public static int Main(string [] args) {
.....
RemotingConfiguration.Regi sterWellKn ownService Type(
typeof(SampleObject), "mysample", WellKnownObjectMode.Single Call );
.....
Basically I want to pass args into SampleObject, how do I do it?
Thanks for any help.
Jennifer
}
I am working on a sample application of Remote Object. It works
if I don't have parameters passed in calling the object, i.e., client
can talk to the server. But how to pass a parameter to server's
object? Below is part of the source code in the server:
public static int Main(string [] args) {
.....
RemotingConfiguration.Regi
typeof(SampleObject), "mysample", WellKnownObjectMode.Single
.....
Basically I want to pass args into SampleObject, how do I do it?
Thanks for any help.
Jennifer
}
ASKER
Thanks,
How to use methods of the remote object to pass value?
Below is the source code for my object:
public class SampleObject : MarshalByRefObject
{
public static DataTable vTable = new DataTable("vTable");
public string getVTable(string date, int id)
{
}
}
How to use methods of the remote object to pass value?
Below is the source code for my object:
public class SampleObject : MarshalByRefObject
{
public static DataTable vTable = new DataTable("vTable");
public string getVTable(string date, int id)
{
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is similar to what I am doing. Thanks.
I will try it over the weekend.
Jennifer
I will try it over the weekend.
Jennifer
If you have constructors that receive parameters you may use client activation (create instances of the remote object with Activator.CreateInstance instead of RegisterWellKnownServiceTy
See http://msdn2.microsoft.com/en-us/library/y0h540a7(VS.80).aspx