Bonjour,
J'ai réalisé mon code coté client et serveur pour mon application de remoting.
Seulement je souhaite placer tout le paramétrage serveur dans le fichier config mais je ne parviens pas à effectuer la même chose ... le client ne peut plus se connecter !

Code serveur: (fonctionnel)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
BinaryServerFormatterSinkProvider provider = new BinaryServerFormatterSinkProvider();
provider.TypeFilterLevel = TypeFilterLevel.Full;
 
IDictionnary props = new Hashtable();
props["port"] = 1069;
 
TcpChannel channel = new TcpChannel(props,null,provider);
ChannelServices.RegisterChannel(channel, true);
 
RemotingConfiguration.RegisterWellKnownServiceType(
          typeof(OpRemote), 
          "OpRemote", 
          WellKnownObjectMode.Singleton);
Remplacé par:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
string FileName = AppDomain.CurrentDomain.BaseDirectory + "ServiceCalcul.exe.config";
RemotingConfiguration.Configure(FileName, false);
Avec dans le fichier config:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<configuration>
  <system.runtime.remoting>
    <application>
      <service>
        <wellknown mode="Singleton"
                   type="OpRemote, ServiceCalcul"
                   objectUri="OpRemote"/>
      </service>
      <channels>
        <channel ref="tcp" port="1069"/>
        <serverProviders>
          <formatter ref="binary" typeFilterLevel="Full"/>
        </serverProviders>
      </channels>
    </application>
  </system.runtime.remoting>
</configuration>
Je ne vois pas ou je me trompe !!!
Si qqn a une petite idée, je suis prenneur!

Merci