.NET Remoting HOST always creating new instances

A

Ahmed

I am trying to create a remoting host where I have a datatable and the
client simply adds rows to the datatable and has the possibility to fetch
the whole datatable.
Every request they make always re-initializes my library so my datatable
becomes a blank one with every new request.What I was looking for is that
once I start my host my datatable will stay in memory until I terminate it
and not with every call to the host.

I hope I am explaining myself correctly :)
TIA,
Ahmed
 
S

Stoitcho Goutsev \(100\) [C# MVP]

Hi Ahmed,

..NET Romoting support 2 types of activations:
- Server activated - they are two subtypes:
- single call - that what you use. Server creates new object each and
every type you make a call to the object.
- singleton - only one object is created on the server and it serves all
the request for all the clients

- Client activated - each client get separate object on the server. This is
more like what the programmers are use to.

So it looks like you haven't chosen the right type of activation.

--
HTH
Stoitcho Goutsev (100) [C# MVP]
Ahmed said:
Single Call
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top