Hi All
I have written an Windows Service that exposes a Remoting object that
takes a DataSet and fills it up. However when I get the dataset back
on the client it's rows are empty. When I log the process I can see a
filled dataset on the server.
This is what I'm doing in the client code, where dSet is an empty
initialized DataSet being sent to the server.
IPDLiceOutputFactory factory = GetRemotingFactory(server);
IPDLiceOutput output = factory.GetBuilder(source, null); //
Here I get a snapshot builder
output.FillDataSet(outputType, dSet);
The factory is...
public class ImpliedFactory: MarshalByRefObject, IPDLiceOutputFactory
{
private IPDLiceOutput GetSnapshotBuilder(string server)
{
SnapshotBuilder builder = new SnapshotBuilder(server);
return (IPDLiceOutput)builder;
}
private IPDLiceOutput GetLoggedBuilder(string server)
{
LoggedBuilder builder = new LoggedBuilder();
return (IPDLiceOutput)builder;
}
#region IPDLiceOutputFactory Members
public IPDLiceOutput GetBuilder(OutputSource builderType, string
server)
{
if (builderType == OutputSource.Snapshot)
return GetSnapshotBuilder(server);
return GetLoggedBuilder(server);
}
#endregion
}
The builder I use is...
public class SnapshotBuilder : MarshalByRefObject, IPDLiceOutput
{
private string _server;
public SnapshotBuilder(string server)
{
_server = server;
}
#region IPDLiceOutput Members
public void FillDataSet(OutputType outputType, PDliceDataSet dSet)
{
PDLiceOutput outputBuilder = new PDLiceOutput(_server,
outputType);
PDLiceDataSetBuilder dsetBuilder = new
PDLiceDataSetBuilder(outputBuilder, DateTime.Now);
dsetBuilder.FillDataSet(dSet);
}
#endregion
The interfaces are defined as...
public interface IPDLiceOutputFactory
{
IPDLiceOutput GetBuilder(OutputSource builderType, string arg);
}
public interface IPDLiceOutput
{
void FillDataSet(OutputType outputType, PDliceDataSet dSet);
}
Any ideas what might be wrong here ??
Sunit 1 1722
When you remote an instance by value, unless you have a ref or out
parameter, the details of the instance are not passed back over the remoting
channel.
Try changing your parameter to ref or out and you should see the changes
reflected back in the calling client.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"sjoshi" <sj****@ingr.comwrote in message
news:ea**********************************@d21g2000 prf.googlegroups.com...
Hi All
I have written an Windows Service that exposes a Remoting object that
takes a DataSet and fills it up. However when I get the dataset back
on the client it's rows are empty. When I log the process I can see a
filled dataset on the server.
This is what I'm doing in the client code, where dSet is an empty
initialized DataSet being sent to the server.
IPDLiceOutputFactory factory = GetRemotingFactory(server);
IPDLiceOutput output = factory.GetBuilder(source, null); //
Here I get a snapshot builder
output.FillDataSet(outputType, dSet);
The factory is...
public class ImpliedFactory: MarshalByRefObject, IPDLiceOutputFactory
{
private IPDLiceOutput GetSnapshotBuilder(string server)
{
SnapshotBuilder builder = new SnapshotBuilder(server);
return (IPDLiceOutput)builder;
}
private IPDLiceOutput GetLoggedBuilder(string server)
{
LoggedBuilder builder = new LoggedBuilder();
return (IPDLiceOutput)builder;
}
#region IPDLiceOutputFactory Members
public IPDLiceOutput GetBuilder(OutputSource builderType, string
server)
{
if (builderType == OutputSource.Snapshot)
return GetSnapshotBuilder(server);
return GetLoggedBuilder(server);
}
#endregion
}
The builder I use is...
public class SnapshotBuilder : MarshalByRefObject, IPDLiceOutput
{
private string _server;
public SnapshotBuilder(string server)
{
_server = server;
}
#region IPDLiceOutput Members
public void FillDataSet(OutputType outputType, PDliceDataSet dSet)
{
PDLiceOutput outputBuilder = new PDLiceOutput(_server,
outputType);
PDLiceDataSetBuilder dsetBuilder = new
PDLiceDataSetBuilder(outputBuilder, DateTime.Now);
dsetBuilder.FillDataSet(dSet);
}
#endregion
The interfaces are defined as...
public interface IPDLiceOutputFactory
{
IPDLiceOutput GetBuilder(OutputSource builderType, string arg);
}
public interface IPDLiceOutput
{
void FillDataSet(OutputType outputType, PDliceDataSet dSet);
}
Any ideas what might be wrong here ??
Sunit
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Prabhu Shastry |
last post by:
Hello group,
I have a Windows Service and an application (C#). Both processes need access
to a single dataset object (created and modified by the service and
application will only read the...
|
by: Sput |
last post by:
Again me
My program is running on a client computer, while on a server is running a
C++ application.
I need to send a message containing some numbers to it from time to time.
I was thinking of...
|
by: OpticTygre |
last post by:
I have a windows service, and a separate desktop application used to
configure settings for the service. I'd also like to use the windows
application as a sort of debug, or notification window, to...
|
by: Jonathan Woods |
last post by:
Hi there,
I have encountered problem of losing data sending over internet using
web service. I consume web service that connected Oracle Database. I
submit 687 SOAP Messages to 1 Web Method...
|
by: Mike9900 |
last post by:
If you do .NET Remoting and Binary Serilization with DataSet it does not work.
If you set the Serialization type to Binary on DataSet, it does not seralize
it correctly on windows xp. To do this...
|
by: nyhetsgrupper |
last post by:
I have written a windows service and want to expose a web based user
interface for this service. I then wrote a class library containing a
..net remoting server. The class library have a method...
|
by: José Joye |
last post by:
Hello,
What is the best way to stop a remoting server (Singleton SAO) that has been
started with RemotingConfiguration.Configure().
For sure, I want to do this without quitting the application...
|
by: Joseph Geretz |
last post by:
I'm a bit puzzled by the current recommendation not to send Datasets or
Datatables between application tiers.
http://support.microsoft.com/kb/306134
...
|
by: erbilkonuk |
last post by:
Hi everyone,
I have been developing a project that is composed of one windows
service and one ASP.NET web site. The windows service and ASP.NET web
site reside on the same server.
I want to send...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
| |