J'ai lu un livre d'Andrew Troelsen Chapitre 25 "Présentation de Windows Communication Foundation". Et en lui faisant EXEMPLE.Lorsque je lance le client sur votre ordinateur, comme c'est bien. pour appeler mon service à partir d'un autre ordinateur, j'obtiens l'erreur suivante: System.ServiceModel.Security.SecurityNegotiationException. Quelle est la raison? App.config de l'hôte:wcf System.ServiceModel.Security.SecurityNegotiationException EXEMPLE Andrew Troelsen
<configuration>
<system.serviceModel>
<services>
<service name = "MagicEightBallServiceLib.MagicEightBallService" >
<host>
<baseAddresses>
<add baseAddress = "http://localhost:8080/MagicEightBallService"/>
<add baseAddress ="net.tcp://localhost:8099/MagicEightBallService"/>
</baseAddresses>
</host>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding openTimeout = "00:00:30" />
</basicHttpBinding>
<netTcpBinding>
<binding closeTimeout = "00:00:15" />
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled = "true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
App.config du client:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IEightBall" />
</basicHttpBinding>
<netTcpBinding>
<binding name="NetTcpBinding_IEightBall" />
</netTcpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8080/MagicEightBallService"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IEightBall"
contract="ServiceReference1.IEightBall" name="BasicHttpBinding_IEightBall" />
<endpoint address="net.tcp://localhost:8099/MagicEightBallService"
binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IEightBall"
contract="ServiceReference1.IEightBall" name="NetTcpBinding_IEightBall">
<identity>
<userPrincipalName value="TK238A-DEBIAN\Debian" />
</identity>
</endpoint>
</client>
</system.serviceModel>
</configuration>
Qu'essayez-vous d'accomplir avec 'userPrincipalName'? – nvoigt