I am writing a system using .Net Remoting, and need abit of advice on how possible it is to create a server that will manage each connected client in the same session.
I have 3 elements, my shared DLL (with all the functions the server is sharing), my actual server (to host the dll), and a client GUI form that calls the functions in the DLL.
My issue is, I am connecting to an SQL database, and returning data from 3 seperate tables within the same dataset. What i'm finding is, when I interregate the first and second table, the data for each is returned and stored in its own table within the same dataset. If i then interregote the first table again, the object seems to have been released and doesn't exist anymore.
What i'm trying to achieve is:
Server (hosted DLL) connects to database and populates a dataset contaning 3 seperate tables. Each client will then connect to this server object, and manipulate the data within the dataset (im trying to avoid lots and lots of SQL database requests). But it appears as if everytime i call on a function on the server, all the objects are released from memory straight away, as if the entire DLL has re-declared itself as a seperate instance. I have set the hosting mode to "Singleton" when initiating the server, so I thought that would have been enough?
Is it possibe to do what I am trying to achieve with .Net Remoting?
Thanks in advance,
// The code the server uses to host the DLL (note the Singleton mode)
TcpChannel chan = new TcpChannel(9932);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(RemoteInfo), "TheServerReference", WellKnownObjectMode.Singleton);