saving ref of remote object

i need to connect to N servers and give them tasks, and after X seconds im checking each one of them if they finished.
so i tried to save the ref to the remote object in a hashTable (as the key), but when im trying to remove an item in the hashTable(after he finished his job) im getting a runtime exception ("Request for premission of type System.runtime.remoting.objref failed" ).
how to get to each server?
thanks in advanced
[459 byte] By [ppl1] at [2008-2-26]
# 1
You dont have the object just a proxy.
Why not use async remoting? There are a number of ways, delegates, async callbacks, or remotely delegatable objects (events) which would suit your needs much better and are very easy to implement.
MarkShehan at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Remoting and Runtime Serialization...
# 2
im new to the remoting thing so i dont know how to use all that possibilities...
can you give me an example or just direct me to an article/example?
ppl1 at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Remoting and Runtime Serialization...
# 3
Would you send the exception stack trace?
douglasp at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Remoting and Runtime Serialization...
# 4
No
ppl1 at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Remoting and Runtime Serialization...
# 5
Without the stack trace it is going to be hard to help you.
douglasp at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Remoting and Runtime Serialization...
# 6
Asynchronous remoting - just like any other asynchronous programming - is making a request on an object and providing a callback to be called when the object has completed it's task. A quick search on asynchronous remoting example yields several good results for example of asynchronous remoting.

To handle multiple servers just makes requests to several object instances. Provided with a callback the remote object - so long as two-way communication is possible (using either the TcpChannel, the new IpcChannel, or some third-party channel; HttpChannel is only one-way) - the remote object will call your callback when completed. Then you don't have to poll to see when the service is complete.

HeathStewart at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Remoting and Runtime Serialization...

.NET Development

Site Classified