Ciao ragazzi ecco qua il mio problema: sto implementando una chat (basata su console) composta da 3 oggetti principali:
-classe server singleton
-classe client (istanziata tante volte quanti sono gli utenti)
-classe servant che contiene la coda dei messaggi

la classe servant l'ho istanziata solo una volta nella classe server poichè tutti gli utenti devono vedere la medesima instanza della coda.
il problema è un errore a runtime nella classe server:
Codice PHP:
public class CAServer
    
{
        public static 
Servant s = new Servant();

        public static 
void Main()
        {
            
TcpChannel tcpChan = new TcpChannel(10060);
            
ChannelServices.RegisterChannel(tcpChan);

            
RemotingConfiguration.RegisterWellKnownServiceType(typeof(Servant), "Singletons"WellKnownObjectMode.Singleton);

            
= (Servant)Activator.CreateInstance(typeof(Servant), null, new object[] { new UrlAttribute("tcp://localhost:10061") });     [COLOR=red]ERRORE[/COLOR]  
            
            
Console.WriteLine("Press enter to shutdown the server.");
            
Console.ReadLine();
        }

        public 
Servant getServant()
        {
            return 
s;
        }
    } 
e questo è il tipo di errore:
Codice PHP:
System.Reflection.TargetInvocationException non è stata gestita
  Message
="Eccezione generata dalla destinazione di una chiamata."
  
Source="mscorlib"
  
StackTrace:
       
in System.RuntimeTypeHandle.CreateInstance(RuntimeType typeBoolean publicOnlyBoolean noCheckBooleancanBeCachedRuntimeMethodHandlectorBooleanbNeedSecurityCheck)
       
in System.RuntimeType.CreateInstanceSlow(Boolean publicOnlyBoolean fillCache)
       
in System.RuntimeType.CreateInstanceImpl(Boolean publicOnlyBoolean skipVisibilityChecksBoolean fillCache)
       
in System.Activator.CreateInstance(Type typeBoolean nonPublic)
       
in System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttrBinder binderObject[] argsCultureInfo cultureObject[] activationAttributes)
       
in System.Activator.CreateInstance(Type typeBindingFlags bindingAttrBinder binderObject[] argsCultureInfo cultureObject[] activationAttributes)
       
in System.Activator.CreateInstance(Type typeObject[] argsObject[] activationAttributes)
       
in RemotingCAServer.CAServer.Main() in *********:riga 21
       in System
.AppDomain._nExecuteAssembly(Assembly assemblyString[] args)
       
in System.AppDomain.ExecuteAssembly(String assemblyFileEvidence assemblySecurityString[] args)
       
in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       
in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       
in System.Threading.ExecutionContext.Run(ExecutionContext executionContextContextCallback callbackObject state)
       
in System.Threading.ThreadHelper.ThreadStart()
  
InnerExceptionSystem.Net.Sockets.SocketException
       Message
="Impossibile stabilire la connessione. Rifiuto persistente del computer di destinazione 127.0.0.1:10061"
       
Source="mscorlib"
       
ErrorCode=10061
       NativeErrorCode
=10061
       StackTrace
:
         
Server stack trace
            
in System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshotSocketAddress socketAddress)
            
in System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
            
in System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)
            
in System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
            
in System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSidBoolean openNew)
            
in System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msgITransportHeaders requestHeadersStream requestStream)
            
in System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msgITransportHeaders requestHeadersStream requestStreamITransportHeadersresponseHeadersStreamresponseStream)
            
in System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)
         
Exception rethrown at [0]: 
            
in System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsgIMessage retMsg)
            
in System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageDatamsgDataInt32 type)
            
in System.Runtime.Remoting.Activation.IActivator.Activate(IConstructionCallMessage msg)
            
in System.Runtime.Remoting.Activation.LocalActivator.DoRemoteActivation(IConstructionCallMessage ctorMsg)
            
in System.Runtime.Remoting.Activation.LocalActivator.Activate(IConstructionCallMessage ctorMsg)
            
in System.Runtime.Remoting.Activation.AppDomainLevelActivator.Activate(IConstructionCallMessage ctorMsg)
            
in System.Runtime.Remoting.Messaging.ClientContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
            
in System.Runtime.Remoting.Activation.ActivationServices.Activate(RemotingProxy remProxyIConstructionCallMessage ctorMsg)
            
in System.Runtime.Remoting.Proxies.RemotingProxy.InternalActivate(IConstructionCallMessage ctorMsg)
            
in System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(IMessage reqMsg)
            
in System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageDatamsgDataInt32 type)
            
in Servant..ctor()
       
InnerException
spero di essere stato chiaro nell'esporre il problema...
in un altro esercizio finchè mi instanziavo la servant nel client non avevo nessun errore...

grazie mille