J'essaie de communiquer entre WCF hébergé dans le service Windows et mon interface graphique de service. Le problème est quand je suis en train d'exécuter la méthode OperationContract Je reçoisComment faire pour résoudre "L'ChannelDispatcher est incapable d'ouvrir son erreur IChannelListener"?
« Le ChannelDispatcher à 'net.tcp: // localhost: 7771/MyService' avec contrat (s) « "IContract" ' impossible d'ouvrir son IChannelListener. "
Mon app.conf ressemble à ça:
<configuration>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="netTcpBinding">
<security>
<transport protectionLevel="EncryptAndSign" />
</security>
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpGetUrl="http://localhost:7772/MyService" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="MyServiceBehavior"
name="MyService.Service">
<endpoint address="net.tcp://localhost:7771/MyService" binding="netTcpBinding"
bindingConfiguration="netTcpBinding" name="netTcp" contract="MyService.IContract" />
</service>
</services>
</system.serviceModel>
Port 7771 est à l'écoute (vérifié à l'aide netstat) et svcutil est capable de générer configs pour moi.
Toutes les suggestions seraient appréciées.
trace de la pile d'exception
Server stack trace: at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Il y a une exeption intérieure (mais pas sous Exeption.InnerExeption mais sous Exeption.Detail.InnerExeption - méthode ToString() n » t montrer que)
Une inscription existe déjà pour URI 'net.tcp: // localhost: 7771/MyService'.
Mais mon service a spécifié cet URI uniquement dans le fichier app.config nulle part ailleurs. Dans toute la solution cet URI apparaît dans le serveur une fois et client une fois.
Pouvez-vous nous donner une trace de pile complète en utilisant "theException.ToString()". Cela affichera toutes les exceptions internes. Avec ce genre d'exception, il y a parfois une autre cause profonde. –